Errors encountered by egg.js using Sequelize

刚开始按照Egg.js的文档安装Sequelize,配置后遇到这样的错误:
 Error: Access denied for user 'root'@'localhost' (using password: YES), sleep 1 seconds to retry... 
 ERROR 15548 nodejs.SequelizeAccessDeniedError: Access denied for user 'root'@'localhost' (using password: YES)

insert image description here
I have several databases like this locally, and I use the school_club database in my project, so the username and password configured in Sequelize at the beginning, of course, also use the username and password of this database, but the above error is reported when the project starts.

After reading the error message, it shows that it has been logging in as the root user, so it changed to the root password later, and it ran successfully. I
insert image description here
don’t know the specific reason, and I’m just learning it. It can also be considered as a solution for students who encounter the same problem.

Guess you like

Origin blog.csdn.net/qq_42944436/article/details/115604123
Recommended