window下navicat錯誤提示:1251-Client does not support authentication protocol requested by server; consider upgrading MySQL client ...
平臺:window10+mysql-8.0.15-winx64+navicat_trial_11.1.20.0(PatchNavicat破解)
錯誤提示:1251-Client does not support authentication protocol requested by server; consider upgrading MySQL client
解決步驟:
用管理員身份打開cmd,
1.輸入"mysql -u root -p [-h locahost -P 3306]"(中括弧內是預設內容)回車輸入root用戶密碼(初次安裝mysql的要求更改後輸入的密碼)進入MySQL客戶端,然後:
2.然後輸入:alter user root@localhost identified by 'password' password expire never; #修改加密規則
3.然後輸入:alter user root@localhost identified with mysql_native_password by 'password'; #更新一下用戶的密碼
4.最後輸入:flush privileges; #刷新許可權
如下:
mysql> alter user root@localhost identified by 'password' password expire never;
mysql> alter user root@localhost identified with mysql_native_password by 'password';
mysql> flush privileges;
其中,"password"是root用戶密碼。
此時,Navicat可以連接成功,
附:Navicat連接屬性-例如:
連接名:wang
主機名或IP地址:localhost
埠號:3306
用戶名:root
密碼:password