解決 客戶端連接 mysql5.7 Plugin 'mysql_native_plugin' is not loaded錯誤


進入mysql數據庫,修改數據庫的內容

 1, use mysql;

2,update user set authentication_string=""  where User='root';//設 authentication_string 為空值 ,因為是連接這個加密的東西

先設密碼為空

3,update user set plugin="mysql_native_password";

4,flush privileges;

5,quit;

然后重啟MySQL。

6,接着在命令行修改root用戶密碼,

     mysqladmin -u root -p password

按提示重設密碼

ok。完美連接成功

 --------------------------------------------------------分割線-----------------------------------------

以上mysqladmin 是window系統有的,Linux用不上,在MySQL5.7以上的版本,mysql的user表的密碼是authentication_string,不再是password

linux更改root密碼:update user set authentication_string=password("test") where User='root';//那個password 是必須要寫的,不然就進不去了數據庫。

flush privileges;


免責聲明!

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



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