当前位置: 首页 > 图文教程 > 数据库 > MYSQL > MYSQL出现" Client does not support authentication "的解决方法

MYSQL
SQL语句因编写不当 可能导致系统不安全
教你如何缩小SQL Server数据库日志文件
sql2000卸载了后重新安装时不能安装的解决办法
MySQL密码忘记了,别害怕
如何防止插入删除表造成的数据库死锁
MySQL是否值得我们选择的正反五个理由
8种方法优化MySQL性能
MySQL服务器默认安装之后如何调节性能
MySQL数据库引擎快速指导
分析MS SQL Server里函数的两种用法
MYSQL数据库初学者使用指南
MySQL数据库安全配置指南
教你如何在MySQL数据库中直接储存图片
如何应用SQL Server DBCC避免堵塞
运用Mysql语句生成后门木马的具体方法
MySQL安全性指南 (1)
你的MySQL安全了吗?加铸23道安全门
MySQL中文参考手册---安装MySQL
MySQL管理员指南之--MySQL用户管理
如何利用MySQL加密函数保护Web网站敏感数据

MYSQL出现" Client does not support authentication "的解决方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 91 ::
收藏到网摘: n/a

MYSQL 帮助:

A.2.3 Client does not support authentication protocol

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:

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

To solve this problem, you should use one of the following approaches:

  • Upgrade all client programs to use a 4.1.1 or newer client library.
  • When connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password.
  • Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function:
    mysql> SET PASSWORD FOR -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
    Alternatively, use UPDATE and FLUSH PRIVILEGES:
    mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd') -> WHERE Host = 'some_host' AND User = 'some_user';
    mysql> FLUSH PRIVILEGES;
    Substitute the password you want to use for ``newpwd'' in the preceding examples. MySQL cannot tell you what the original password was, so you'll need to pick a new one.
  • Tell the server to use the older password hashing algorithm:
    1. Start mysqld with the --old-passwords option.
    2. Assign an old-format password to each account that has had its password updated to the longer 4.1 format. You can identify these accounts with the following query:
      mysql> SELECT Host, User, Password FROM mysql.user -> WHERE LENGTH(Password) > 16;
      For each account record displayed by the query, use the Host and User values and assign a password using the OLD_PASSWORD() function and either SET PASSWORD or UPDATE, as described earlier.

For additional background on password hashing and authentication, see section 5.5.9 Password Hashing in MySQL 4.1.