mysql 無法連接提示 Authentication plugin 'caching_sha2_password' cannot be loaded


 mysql 無法連接提示 Authentication plugin 'caching_sha2_password' cannot be loaded

可能是密碼沒有設置或者,密碼設置類型不符,可參考如下步驟解決

1 查看當前賬戶,和密碼

select user,host,password from user;

或者是否設置了authentication_string

select user,host,authentication_string,plugin from mysql.user;

2 如果沒有設置,就重置密碼

grant all privileges on *.* to 'yourname'@'localhost' identified by 'yourpassword'

或者對應第二種情況

ALTER USER 'XXXX'@'%' IDENTIFIED WITH mysql_native_password BY 'XXXXXXXX';

3 最后需要刷新下權限

flush privilege

4 如果是不重要的用戶名,也可以通過新建用戶賦予權限,

grant all privileges on *.* to 'xxx'@'localhost' identified by 'xxxx' ;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM