Navicat 連接MySQL服務出現異常,錯誤代碼1251

錯誤提示

           1251-Client does not support authentication protocol requested by server; consider upgrading MySQL client

解決辦法:

           用管理員身份打開cmd,輸入 mysql -uroot -p  [-h locahost -P 3306]括號內爲默認內容,回車輸入root密碼進入MySQL客戶端;然後

mysql> alter user root@localhost identified by 'yourpassword' password expire never;
mysql> alter user root@localhost identified with mysql_native_password by 'yourpassword';
mysql> flush privileges;    # 刷新權限

 

PS:    "yourpassword"是root用戶密碼。
此時,Navicat可以連接成功,問題解決!

發佈了35 篇原創文章 · 獲贊 14 · 訪問量 1萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章