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

所属分类: 数据库 / Mysql 阅读数: 745
收藏 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.

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

CentOS7下mysql 8.0.16 安装配置方法图文教程

这篇文章主要为大家详细介绍了CentOS7下mysql 8.0.16 安装配置方法图文教程,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

windows下mysql 8.0.16 安装配置方法图文教程

这篇文章主要为大家详细介绍了windows下mysql 8.0.16 安装配置方法图文教程,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

Windows10 mysql 8.0.12 非安装版配置启动方法

这篇文章主要为大家详细介绍了Windows10 mysql 8.0.12 非安装版配置启动,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

从MySQL全库备份中恢复某个库和某张表的方法

这篇文章主要介绍了从MySQL全库备份中恢复某个库和某张表的方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

mysql-8.0.15-winx64 解压版安装教程及退出的三种方式

本文通过图文并茂的形式给大家介绍了mysql-8.0.15-winx64 解压版安装,非常不错,具有一定的参考借鉴价值,需要的朋友可以参考下
收藏 0 赞 0 分享

详解mysql 获取某个时间段每一天、每一个小时的统计数据

这篇文章主要介绍了mysql 获取某个时间段每一天、每一个小时的统计数据,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

MySQL学习(七):Innodb存储引擎索引的实现原理详解

这篇文章主要介绍了Innodb存储引擎索引的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

数据结构-树(三):多路搜索树B树、B+树

这篇文章主要介绍了多路搜索树B树、B+树,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

详解MySQL从入门到放弃-安装

这篇文章主要介绍了MySQL从入门到放弃-安装,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

阿里云ECS云服务器(linux系统)安装mysql后远程连接不了(踩坑)

这篇文章主要介绍了阿里云ECS云服务器(linux系统)安装mysql后远程连接不了(踩坑),小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享
查看更多