1. 程式人生 > >Mysql 使用Navicat連線失敗 報錯 Authentication plugin 'caching_sha2_password' cannot be

Mysql 使用Navicat連線失敗 報錯 Authentication plugin 'caching_sha2_password' cannot be

Mysql 使用Navicat連線失敗 報錯:

Authentication plugin ‘caching_sha2_password’ cannot be
loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_
password.so, 2):

表明連結資料庫時不能載入‘caching_sha2_password’這個外掛,也就是不能對身份驗證。

解決方案:

1、開啟系統偏好設定,找到mysql,點選Initialize Database。
2、選擇‘Use legacy password‘。
3、輸入你的新密碼。
4、重啟mysql服務。

在這裡插入圖片描述

現在回到Navicat輸入密碼進行連線。在這裡插入圖片描述

嘗試連線測試,成功了!
在這裡插入圖片描述