注册 | 登录
收藏 | 帮助
热门文章
编辑推荐
相关文章  
简单三步走堵死SQLServer注入漏洞
黑客攻破SQL服务器系统的十种方法
透明防火墙架设的完全攻略(brid
linux定时备份mysql数据库
DNS (domain Name System) 系统的
qmail+vpopmail+sqwebmail的安装
qmail Vpopmail And sqwebmail H
qmail Vpopmail And sqwebmail H
qmail Vpopmail And sqwebmail H
qmail Vpopmail And sqwebmail H
您现在的位置: 顶尖设计 >> IT学院 >> 数据库 >> MySQL >> 文章正文
MYSQL 新版出现 Client does not support authentication protocol requested by server; consider upgrad
作者:stiwin  来源:CSDN  点击:  更新:2006-12-20
简介:

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.


例子:
SET PASSWORD FOR 用户名@localhost = OLD_PASSWORD('密码');




  • 上一篇文章:
  • 下一篇文章:
  • 分享此文:该页面添加到 Mister Wong 添加到雅虎Yahoo!收藏 Add to:Del.icio.us Post to Furl Digg this 添加到Google书签 reddit spurl blogmarks 365Key 评论  收藏  分享  打印
     我来说两句
    姓名:       验证码:   
    主页: 
    评分: 1分 2分 3分 4分 5分
    本频道近期热评文章:
      关于我们 | 联系我们 | 站点地图 | 广告投放 | 友情链接 | 在线留言 | 版权申明
    版权所有 © 2004-2007 顶尖设计(bobd.cn)
    未经授权禁止转载,摘编,复制本站内容或建立镜像. 沪ICP备07504942号 
    网络110
    报警服务