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使權限配置項立即生效。

再次連接,成功

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