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

所属分类: 数据库 / Mysql 阅读数: 780
收藏 0 赞 0 分享

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.

更多精彩内容其他人还在看

mysql服务1067错误多种解决方案分享

今天我的mysql服务器突然出来了1067错误提示,无法正常启动了,我今天从网上找寻了大量的解决mysql服务1067错误的办法,有需要的朋友可以看看
收藏 0 赞 0 分享

深入Mysql字符集设置分析

深入Mysql字符集设置分析,使用mysql的朋友可以参考下
收藏 0 赞 0 分享

MySql 备忘录

在MySQL中如果不为NOT NULL字段赋值(等同于赋NULL值)也就是说,MySQL中NOT NULL并不是一个约束条件了
收藏 0 赞 0 分享

利用mysql的inet_aton()和inet_ntoa()函数存储IP地址的方法分享

当前很多应用都适用字符串char(15)来存储IP地址(占用16个字节),利用inet_aton()和inet_ntoa()函数,来存储IP地址效率很高,适用unsigned int 就可以满足需求,不需要使用bigint,只需要4个字节,节省存储空间,同时效率也高很多
收藏 0 赞 0 分享

IP处理函数inet_aton()和inet_ntoa()使用说明

IP处理函数inet_aton()和inet_ntoa()使用说明,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql数据库互为主从配置方法分享

共有四台机器:A(10.1.10.28),B(10.1.10.29),C(10.1.10.30),D(10.1.10.31)。配置后结果:A-C互为主从,B为A的slave,D为C的slave
收藏 0 赞 0 分享

Mysql中校对集utf8_unicode_ci与utf8_general_ci的区别说明

一直对utf8_unicode_ci与utf8_general_ci这2个校对集很迷惑,今天查了手册有了点眉目。不过对中文字符集来说采用utf8_unicode_ci与utf8_general_ci时有何区别还是不清楚
收藏 0 赞 0 分享

对于mysql的query_cache认识的误区

一直以来,对于mysql的query_cache,在网上就流行着这样的说法,对于mysql的query_cache键值就是mysql的query,所以,如果在query中有任何的不同,包括多了个空格,都会导致mysql认为是不同的查询
收藏 0 赞 0 分享

MySQL InnoDB之事务与锁详解

MySQL InnoDB之事务与锁详解,需要使用事务的朋友可以参考下
收藏 0 赞 0 分享

mysql中迅速插入百万条测试数据的方法

最近想到创建一个大量数据的测试环境,于是找了一下怎么插入100W条数据,我用的是20个字段
收藏 0 赞 0 分享
查看更多