现在我只有这段代码:
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文件时,我遇到了这个错误。我已经尝试了很多解决方案,包括我发现的更常见的方法,但它没有起作用。所以现在我不知道该怎么办。有人可以帮帮我吗?
谢谢