It clearly depends on how you initialize the connection.
You can just declare the username as root and the password as null.
{
"development": {
"username": "root",
"password": null,
"database": "database_development",
"host": "127.0.0.1",
"dialect": "mysql"
},
"test": {
"username": "root",
"password": null,
"database": "database_test",
"host": "127.0.0.1",
"dialect": "mysql"
},
"production": {
"username": "root",
"password": null,
"database": "database_test",
"host": "127.0.0.1",
"dialect": "mysql"
}
}
Now if you just instantiate a Sequelize object you can try skipping the password parameter entirely like below.
const Sequelize = require('sequelize');
const sequelize = new Sequelize('database', 'username', null, {
host: 'localhost',
dialect: 'mysql' | 'sqlite' | 'postgres' | 'mssql',
operatorsAliases: false,
pool: {
max: 5,
min: 0,
acquire: 30000,
idle: 10000
},
});