PHP链接MySQL时出现问题解决方法

MySQL版本:5.0
PHP版本:5.0

链接mysql时出现的问题,提示:#1251 - 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;

相关推荐