现在我只有这个代码:
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);
});
Run Code Online (Sandbox Code Playgroud)
但是当我尝试运行.js时,我得到了这个错误.我已经尝试了很多解决方案,包括我经常发现的解决方案,但它没有用.所以现在我不知道该怎么做.有人能帮助我吗?
谢谢