Mysql修改加密方式
阿新 • • 發佈:2018-11-01
轉載。
Mysql 安裝完客戶端連線報錯:“Authentication plugin 'caching_sha2_password' cannot be loaded: ”
意思是客戶端不支援caching_sha2_password的加密方式。
或客戶端連線提示 Client does not support authentication protocol requested by server; consider upgrading MySQL client錯誤
執行命令
use mysql;
select user,plugin from user ;
可以看到root使用者的加密方式為caching_sha2_password
這樣的話有兩種辦法可以解決問題:
一、升級客戶端支援caching_sha2_password方式,沒有采用。
我使用第二種方法:
二、修改密碼加密方式,改成mysql_native_password
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
然後修改密碼:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpassword');
或者執行命令flush privileges使許可權配置項立即生效。
---------------------
作者:gao-peng
來源:CSDN
原文:https://blog.csdn.net/weixin_40393909/article/details/80390315
版權宣告:本文為博主原創文章,轉載請附上博文連結!