egg-sequelize 连接 mysql 遇到问题
2019-06-23 本文已影响2人
前端大课堂
egg-sequelize 连接 mysql 遇到问题
2019-06-23 20:33:51,001 ERROR 15465 nodejs.SequelizeConnectionError: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at Promise.tap.then.catch.err (/Users/80251773/codes/2019/2019-02/egg-sequelize-demo/node_modules/_sequelize@5.8.12@sequelize/lib/dialects/mysql/connection-manager.js:133:19)
解决办法:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '12345678'
其中 root 是用户名,12345678 替换成对应的密码即可。