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

MYSQL
SQL Server与Oracle数据库在查询优化上的差异
轻松掌握怎样从Windows命令行启动MySQL
教你轻松掌握MaxDB和MySQL之间的协同性
教你轻松了解MySQL数据库中的结果字符串
解析:轻松了解 MySQL中损坏的MyISAM表
解析:MySQL 数据库搜索中大小写敏感性
实例解析:MySQL 实例管理器识别的命令
快速掌握 Mysql数据库对文件操作的封装
帮助你分析MySQL的数据类型以及建库策略
从MySQL导大量数据的程序实现方法
MySQL数据库中设列的默认值为Now()的介绍
如何将txt文本中的数据轻松导入MySQL表中
带你深入了解MySQL数据库系统参数的优化
初学MySql5 所应了解的知识和常见问题
MYSQL数据库实用学习资料之常用命令集合
MySQL数据库配置技巧
Mysql数据库常用命令
计划备份mysql数据库
一次MySQL性能优化实战
MySQL乱码问题深层分析

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 61 ::
收藏到网摘: 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.