【发布时间】:2018-10-04 03:15:19
【问题描述】:
现在我只有这个代码:
const Sequelize = require('sequelize');
const sequelize = new Sequelize('database', 'root', 'passwd', {
host: 'localhost',
dialect: 'mysql',
// http://docs.sequelizejs.com/manual/tutorial/querying.html#operators
operatorsAliases: false
});
sequelize
.authenticate()
.then(() => {
console.log('Connection has been established successfully.');
})
.catch(err => {
console.error('Unable to connect to the database:', err);
});
但是当我尝试运行 .js 时,我得到了this error。我已经尝试了很多解决方案,包括我找到的more often but it didn't work。所以现在我不知道该怎么办。有人可以帮帮我吗?
谢谢
【问题讨论】:
-
您为您的服务器配置了哪些身份验证模式?
-
caching_sha2_password
标签: javascript mysql node.js sequelize.js