使用Navicat連接MySQL有時會出現(xiàn)報錯1251的情況
錯誤提示
1251-Client does not support authentication protocol requested by server; consider upgrading MySQL client
解決方案
1.直接修改
用管理員身份打開cmd弦聂,輸入"mysql -u root -p [-h locahost -P 3306]"(中括號內(nèi)是默認內(nèi)容)回車輸入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;# 刷新權(quán)限
其中,"newpassword"是root用戶新密碼善炫。
此時搁胆,Navicat可以連接成功块促,問題解決登澜!
2.卸載重裝
這里建議用安裝時的軟件包進行卸載能夠卸的干凈一些不過最好還是自己檢查一下C://User(用戶)/AppDate/下和注冊表里還有沒有Mysql的殘留,卸載干凈以后直接再安裝就好.