位置:海鸟网 > IT > mySQL >

升级MySQL server后的错误

  升级MySQL到5.x后

  使用:

  GRANT ALL ON database.* TO some_user@'%' IDENTIFIED BY 'newpwd';

  创建的用户。

  使用旧的mysql clinet通过网络连接数据库总是提示

shell> 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'); or

mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES;


  这样就OK了