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

所属分类: 数据库 / Mysql 阅读数: 778
收藏 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 8.0.20 Window10免安装版配置及Navicat管理教程图文详解

这篇文章主要介绍了MySQL 8.0.20 Window10免安装版配置及Navicat管理,本文通过图文并茂的形式给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql安装navicat之后,出现2059,Authentication plugin及本地链接虚拟机docker,远程链接服务器

这篇文章主要介绍了mysql安装navicat之后,出现2059,Authentication plugin及本地链接虚拟机docker,远程链接服务器,需要的朋友可以参考下
收藏 0 赞 0 分享

SQL Server数据库错误5123解决方案

这篇文章主要介绍了SQL Server数据库错误5123解决方案,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
收藏 0 赞 0 分享

MySql 存储引擎和索引相关知识总结

这篇文章主要介绍了MySql 存储引擎和索引相关知识总结,文中讲解非常细致,代码帮助大家更好的理解和学习,感兴趣的朋友可以了解下
收藏 0 赞 0 分享

浅谈MySql 视图、触发器以及存储过程

这篇文章主要介绍了MySql 视图、触发器以及存储过程的的相关资料,文中讲解非常细致,代码帮助大家更好的理解和学习,感兴趣的朋友可以了解下
收藏 0 赞 0 分享

linux环境下安装mysql数据库的详细教程

这篇文章主要介绍了linux环境下安装mysql数据库的详细教程,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下
收藏 0 赞 0 分享

MySQL语句执行顺序和编写顺序实例解析

这篇文章主要介绍了MySQL语句执行顺序和编写顺序实例解析,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql数据库是做什么

在本篇文章里小编给大家分享的是一篇关于mysql数据库是做什么的基础性文章,有兴趣的朋友们可以学习下。
收藏 0 赞 0 分享

sql与mysql有哪些区别

在本篇文章里小编给大家分享了关于sql与mysql的区别的内容,有兴趣的朋友们可以学习参考下。
收藏 0 赞 0 分享

mysql属于关系型数据库吗

在本篇文章里小编给大家分享的是一篇关于mysql是否属于关系型数据库的相关文章,有兴趣的朋友们可以参考下。
收藏 0 赞 0 分享
查看更多