刚开始按照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)
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
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.