页:
[1]
| babalala | 2005-5-11 05:42 AM |
|
phpmyadmin登录失败.......
这是三种登陆方式所提示的错误,总而言之就是密码错误,可是我用这个密码在MySQLDataWizard和cmd都可以正常登陆。
Apache 2.0.51
php 3.4.8
mysql 4.1
config:
欢迎使用 phpMyAdmin 2.6.1-pl3
phpMyAdmin 试图连接到 MySQL 服务器,但服务器拒绝连接。您应该检查 config.inc.php 中的主机、用户名和密码,并且确定这些信息与 MySQL 服务器的管理员所给出的信息一致。
错误
MySQL 返回:
#1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client
http:
欢迎使用 phpMyAdmin 2.6.1-pl3
用户名/密码错误,访问被拒绝。
cookie:
错误
#1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client
以下是config.inc.php的设置:
[PHP]$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port'] = '3306'; // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension'] = 'mysql'; // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress'] = TRUE; // Use compressed protocol for the MySQL connection
// (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser'] = 'root'; // MySQL control user settings
// (this user must have read-only
$cfg['Servers'][$i]['controlpass'] = '********'; // access to the "mysql/user"
// and "mysql/db" tables).
// The controluser is also
// used for all relational
// features (pmadb)
$cfg['Servers'][$i]['auth_type'] = 'cookie'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = '********'; // MySQL password (only needed
// with 'config' auth_type)[/PHP] |
|
由于MySQL 4.1版本开始密码的hash算法改变,所以连接数据库
时可能会出现Client does not support authentication protocol问题。
可以通过一下两种方法解决
其一:
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; |
| babalala | 2005-5-13 05:54 AM |
|
| 感谢 |
Powered by Discuz! Archiver 6.1.0
© 2001-2006 Comsenz Inc.
Processed in 0.005864 second(s), 2 queries |