連接mysql8時提示1251的錯誤

錯誤提示

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

解決辦法

用管理員身份打開cmd,輸入"mysql -u root -p" 回車輸入root用戶密碼進入MySQL客戶端,然後:

mysql> alter user root@localhost identified by 'newpassword' password expire never;

mysql> alter user root@localhost identified with mysql_native_password by 'newpassword';

mysql> flush privileges;    # 刷新權限

其中"newpassword"是root用戶新密碼。再用Navicat連接就可以了,問題解決!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章