mysql 连接报错2059

登陆

执行命令

use mysql;

select user,plugin from user where user='root';

可以看到当前用户的加密方式为caching_sha2_password

 

执行命令

alter user 'root'@'%' identified with mysql_native_password by '111qqq';

将用户的加密方式改为mysql_native_password。

执行命令flush privileges使权限配置项立即生效。

再次连接,成功

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章