发新话题
打印

phpMyAdmin+MySQL 4.1X用户登录的密码问题

phpMyAdmin+MySQL 4.1X用户登录的密码问题

  今天给Debian更新了MySQL, PHP和PHPMyAdmin。开始空密码的时候用PHPMyAdmin登录还OK,不过当我用PHPMyAdmin改了密码之后再登陆就进不去了:

Client does not support authentication protocol requested
by server; consider upgrading MySQL client

可是我用的MySQL, PHP, PMA都是最新版的呀?

Google了一下,从MYSQL的网站得知:
MySQL 4.1 and up uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older clients. If you upgrade the server to 4.1, attempts to connect to it with an older client may fail with the following message...

MySQL 4.1 及其后版本验证协议使用的密码哈希算法与老的客户端不兼容。如果升级到4.1以后使用一个老的客户端连接就会出现上面的提示信息了。

还好MySQL还给出了兼容老客户端的解决方法:

首先登录进shell, 执行
mysql -u user -p
输入user的密码登入。(mysql客户端已经是新版了可以登入)
然后执行:
SET PASSWORD FOR 'user'@'host' = OLD_PASSWORD('password');

把user, host(通常都是localhost), password替换成你的,以后再使用PHPMyAdmin也就能正常使用了

[ Last edited by ddt2000 on 2005-6-5 at 14:21 ]
发新话题