博客新地址

http://wyz.67ge.com/

解决Mysql链接错误:Client does not support authentication protocol requested by server; consider upgrading MySQL client

通过myodbc无法链接至MySQL的错误:
Client does not support authentication protocol requested
by server; consider upgrading MySQL client
官方的说法是
MySQL 4.1 and up uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older clients. .....
如果你升级mysql到4.1以上版本后遇到以上问题,请先确定你的mysql client 是4.1或者更高版本.(WINDOWS下有问题你就直接跳到下面看解决方法了,因为MYSQL 在WINDOWS是client和server一起装上了的)

请使用以下两种方法之一
进入命令行下,转到MYSQL目录的BIN目录下,进入MYSQL命令行模式:
例:d:\mysql\bin>mysql -uroot -p123 (用户root,密码123)
其一:
mysql> SET PASSWORD FOR
    -> '登录用户名'@'主机地址' = OLD_PASSWORD('新密码');

其二:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')

    -> WHERE Host = 'some_host' AND User = 'some_user';

mysql> FLUSH PRIVILEGES;

这样做后,连接就会正常了,我只用了第一种方法就OK了。

posted @ 2008-12-23 12:52  yongzhi  阅读(7021)  评论(0编辑  收藏  举报

博客新地址

http://wyz.67ge.com/