node index.js 报错
来源:6-4 nodejs操作 mysql
慕粉1472529697
2022-02-06
老师,我执行node index.js的时候报错了
4回答
-
FunnyCoder24
2023-05-24
CLient does not support authent ication protocol requested by server; consider upgrading MysQL client '
原因:mysql版本问题, mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password,所以可以需要改变mysql的加密规则
查看现有的用户
SELECT user,host,plugin from mysql.user;
设置加密方式
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你自己的密码';
让设置生效
FLUSH PRIVILEGES;
查看设置是否成功
10 -
双越
2022-02-07
你百度搜一下这句话,会有详细的解决方案。需要配置一下数据库
10 -
豆子金豆
2023-03-12
问题数据库连接失败:
Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
尝试方案:修改数据库密码加密方式失败
https://blog.csdn.net/m0_45382009/article/details/126251555
解决方案:更换包为mysql2
https://stackoverflow.com/questions/50093144/mysql-8-0-client-does-not-support-authentication-protocol-requested-by-server
00 -
慕先生6246991
2023-01-15
我碰到了同样的问题,你后来咋解决的?
012023-09-24
相似问题