解决mysql新旧版本密码加密算法不一样的问题_MySQL
时间:2021-07-01 10:21:17
帮助过:5人阅读
mysql 旧版本升级至4.1以上版本的时候,当出现以下错误: Client does not support authentication protocol requested
by server; consider upgrading MySQL client
其实这是因为mysql4.1以后,密码的加密算法不一样了的缘故。
解决办法:USE mysql; UPDATE user SET password=old_password('new_password') WHERE host='%' AND user='some_user'; FLUSH PRIVILEGES;
2、命令方法
mysql> UPDATE mysql.user SET PASSWORD = OLD_PASSWORD('new_password') WHERE host='%' AND USER = 'some_user';
1、sql方法