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

所属分类: 数据库 / Mysql 阅读数: 750
收藏 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数据库主从复制延时超长的解决方法

这篇文章主要给大家介绍了关于MySQL数据库主从复制延时超长的解决方法,文中通过示例代码介绍的非常详细,对大家学习或者使用MySQL具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
收藏 0 赞 0 分享

解决当MySQL数据库遇到Syn Flooding问题

Syn攻击常见于应用服务器,而数据库服务器在内网中,应该很难碰到类似的攻击,这篇文章主要介绍了当MySQL数据库遇到Syn Flooding问题 ,需要的朋友可以参考下
收藏 0 赞 0 分享

Win10下免安装版MySQL8.0.16的安装和配置教程图解

这篇文章主要介绍了Win10下免安装版MySQL8.0.16的安装和配置 ,本文通过图文并茂的形式给大家介绍的非常详细,具有一定的参考解决价值,需要的朋友可以参考下
收藏 0 赞 0 分享

MYSQL定时清除备份数据的具体操作

这篇文章主要给大家介绍了关于MYSQL定时清除备份数据的具体操作,文中通过示例代码介绍的非常详细,对大家学习或者使用MYSQL具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
收藏 0 赞 0 分享

Win10系统下MySQL8.0.16 压缩版下载与安装教程图解

这篇文章主要介绍了Win10系统下MySQL8.0.16 压缩版下载与安装教程图解,本文图文并茂给大家介绍的非常详细,具有一定的参考解决价值,需要的朋友可以参考下
收藏 0 赞 0 分享

Mysql错误:Too many connections的解决方法

这篇文章主要给大家介绍了关于Mysql错误Too many connections的解决方法,文中通过示例代码介绍的非常详细,对大家学习或者使用Mysql具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
收藏 0 赞 0 分享

为何不要在MySQL中使用UTF-8编码方式详解

这篇文章主要给大家介绍了关于为何不要在MySQL中使用UTF-8编码方式的相关资料,文中通过示例代码介绍的非常详细,对大家学习或者使用MySQL具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
收藏 0 赞 0 分享

mysql-8.0.16 winx64的最新安装教程图文详解

最近刚学习数据库,首先是了解数据库是什么,数据库、数据表的基本操作,这就面临了一个问题,mysql的安装,我这里下载的是64位的,基于Windows的,需要的朋友可以参考下
收藏 0 赞 0 分享

MySql 8.0.16-win64 安装教程

本文通过图文并茂的形式给大家介绍了MySql 8.0.16-win64 安装教程 ,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql 8.0.16 Win10 zip版本安装配置图文教程

这篇文章主要为大家详细介绍了mysql 8.0 Win10 zip版本安装配置图文教程,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享
查看更多