我在Heroku上玩游戏并尝试链接到postgres数据库。我的应用程序直接链接到github源代码。当我使用Heroku数据库凭据在本地运行它并使用npm start它可以工作,但是当它部署时,我发现了这个错误:
{"name":"SequelizeConnectionError","message":"password authentication failed for user \"riunhwzbjuwwgw\"","parent":
{"name":"error","length":103,"severity":"FATAL","code":"28P01","file":"auth.c","line":"285","routine":"auth_failed"},"original":
{"name":"error","length":103,"severity":"FATAL","code":"28P01","file":"auth.c","line":"285","routine":"auth_failed"}}
有什么想法吗?
编辑:这里是连接
var sequelize = new Sequelize(config.db.dbName, config.db.username, config.db.password, {
host: config.db.host,
dialect: config.db.dialect,
port: config.db.port,
dialectOptions: {
ssl: true
},
logging : false
});
和我的变量
db: {
dbName: process.env.DBNAME,
username : process.env.DBUSER,
password : process.env.DBPASSWORD,
host : process.env.DBHOST,
dialect: "postgres",
port : 5432
}
就像我说的那样,它在本地运作。密码设置像DBUSER riunhwzbjuwwgw,它可能是那些斜线吗? \" riunhwzbjuwwgw \"