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

所属分类: 数据库 / Mysql 阅读数: 809
收藏 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使用的常见问题解决与应用技巧汇总

这篇文章主要给大家总结介绍了我们平时在使用MySQL遇到的常见问题解决与应用技巧的相关资料,包括忘记MySQL的root密码、如何处理 myisam 存储引擎的表损坏、数据目录磁盘空间不足的问题等等问题,需要的朋友可以参考借鉴,下面来一起看看吧。
收藏 0 赞 0 分享

数据库管理中19个MySQL优化方法

小编给大家总结了19条非常实用的MySQL数据库优化方法,这是每个服务器管理人员都必须知道的,一起学习下。
收藏 0 赞 0 分享

Mysql优化之Zabbix分区优化

这篇文章主要介绍了Mysql优化中Zabbix分区优化的详细方法和优缺点分析,一起学习下。
收藏 0 赞 0 分享

MySQL5.6.22安装配置方法图文教程

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

Linux下MySQL卸载和安装图文教程

这篇文章主要为大家详细介绍了Linux下MySQL卸载和安装图文教程,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

mysql 5.7.15版本安装配置方法图文教程

这篇文章主要为大家详细介绍了mysql 5.7.15安装配置方法图文教程,更改数据库data的存储路径,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

MySQL Community Server压缩包安装配置方法

这篇文章主要为大家详细介绍了MySQL Community Server压缩包安装配置方法,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

MySQL5.6.17数据库安装 如何配置My.ini文件

这篇文章主要为大家详细介绍了MySQL数据库安装教程,教大家如何配置My.ini文件,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

mysql5.7.17压缩包安装配置方法图文教程

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