Home  >  Article  >  Database  >  解决mysql新旧版本密码加密算法不一样的问题_MySQL

解决mysql新旧版本密码加密算法不一样的问题_MySQL

WBOY
WBOYOriginal
2016-06-01 13:52:091516browse

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方法

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn