Mysql 8.0.18 遠程連接報錯:2059 - Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen...

此問題是由于高版本MySQL更改加密方式導致,部分低版本的連接工具可能不支持改加密方式。

解決方法:

mysql -u root  // 登錄MySQL
use mysql; // 進入MySQL數據庫
select user,plugin from user where user='root';  // 查看root用戶使用的plugin

ps: 如果是其他用戶,請更換成 select user,plugin from user where user='其他用戶';

image.png

我們需要把 caching_sha2_password 更換成 mysql_native_password;

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容