连接发生以下错误
Unhandled rejection SequelizeConnectionError: Client does not support authentication protocol requested by server; consider upgrading MySQL client
解决办法
进入mysql命令行,以此运行以下命令:
USE mysql;
1.ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;
2.FLUSH PRIVILEGES;
注意
1.password 为登录mysql密码;
2.执行命令1失败,需将localhost改为%
3.如果还是报上面的错误,需要升级mysql2(very important)