連接MySQL錯誤“plugin caching_sha2_password could not be loaded”的解決辦法


MySQL新版默認使用caching_sha2_password作為身份驗證插件,而舊版是使用mysql_native_password。
當連接MySQL時報錯“plugin caching_sha2_password could not be loaded”時,可換回舊版插件。

mysql -hlocalhost -uroot -p123456 //進入數據庫
use mysql;
ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY '123456'; //123456是密碼
FLUSH PRIVILEGES

 


免責聲明!

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



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