1. 程式人生 > >navicat 連線 mysql 出現Client does not support authentication protocol requested by server解決方案

navicat 連線 mysql 出現Client does not support authentication protocol requested by server解決方案

今天安裝了navicat 和 mysql,結果最後在navicat中連線mysql時,出現瞭如下錯誤提示:

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

網上找了如下方法:

其一:

mysql> SET PASSWORD FOR
-> ‘some_user’@’some_host’ = OLD_PASSWORD(‘newpwd’);

其二:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD(‘newpwd’)

-> WHERE Host = ‘some_host’ AND User = ‘some_user’;

mysql> FLUSH PRIVILEGES;

上面some_user、some_host、newpwd按自己實際情況修改

但是自己嘗試了之後依舊有錯誤提示,最後嘗試瞭如下方法恢復正常:

USE mysql;
ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘831015’;
FLUSH PRIVILEGES;

root是使用者名稱,localhost是ip地址127.0.0.1都是特指本機,mysql_native_password是舊的密碼驗證機制,831015是密碼,最後別忘了分號;