node后台 mysql处理模块(版本:2.16.0) 执行connect方法时报错:
Client does not support authentication protocol requested by server;
遇到这个问题,在网上找到了比较可行的解决办法。
具体如下:
1. 跑起mysql
mysql -uroot -p'your password';
2. 更新密码
-- 可选操作(可跳过),更新加密方式 ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new password';
3. 刷新MySQL系统权限相关表
FLUSH PRIVILEGES;
至此,如果不涉及其他问题,本文中只要探讨的问题已经解决!