使用MySQL,運行系統報錯Authentication method 'caching_sha2_password' is not supported.


mysql 系統報錯:{"state":"error","message":"Authentication method 'caching_sha2_password' }

原因:mysql版本身份驗證引起的

解決方法:

1.查詢mysql數據庫中user表plugin列的值,是否如下

如果不同請如下操作:

       1.1:ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密規則 

        1.2:ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新一下用戶的密碼 

        1.3:FLUSH PRIVILEGES; #刷新權限 

        1.4:再重置下密碼:alter user 'root'@'localhost' identified by '123456';

2.修改配置文件如下(my.ini文件):


default_authentication_plugin=mysql_native_password添加到配置中。

3.重啟服務。

4.完成


免責聲明!

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



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