Mysql 連線提示 Client does not support authentication protocol requested by server; consider upgrading MySQL client 解決方法
Mysql 4.1以上的版本在連線資料庫時出現:Client does not support authentication protocol requested by server; consider upgrading MySQL client 按照以下辦法可以得到解決,也是查閱的資料整理出來的,做個備忘,有不當之處不吝賜教。
1. mysql的登入
1) linux系統,Shell下使用 mysql -u root -p 方式登入至 mysql。
2) Windows系統,安裝Navicat 8 for mysq或者其他客戶端工具均可登入至mysql,方法較多,不一一指出。
2. 切換至mysql資料庫
use mysql;
3. 檢視mysql中的user表中的資料
select user,password,host from user;
例:
+------------------+-----------+-------------------------------------------+
| user | host | password |
+------------------+-----------+-------------------------------------------+
| root | % | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29|
| test | % | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 |
+------------------+-----------+-------------------------------------------+
4. 修改密碼加密方式
步驟3的表格password欄位的加密方式是以Mysql 的PASSWORD('your password')函式加密的32位MD5密碼。
用以下語句修改密碼加密方式,並進行重新整理:
update user set password=old_password('your new password') where user='user name';
flush privileges;
5. 重新連線資料庫,finish。