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

所属分类: 数据库 / Mysql 阅读数: 796
收藏 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具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
收藏 0 赞 0 分享

MySQL自动停机的问题处理实战记录

这篇文章主要给大家介绍了关于MySQL自动停机的问题处理,文中通过示例代码介绍的非常详细,对大家学习或者使用MySQL具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
收藏 0 赞 0 分享

MySQL5.6.40在CentOS7 64下安装过程详解

这篇文章主要介绍了MySQL5.6.40在CentOS7 64下安装过程,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下
收藏 0 赞 0 分享

MySql数据库基础知识点总结

这篇文章主要介绍了MySql数据库基础知识点,总结整理了mysql数据库基本创建、查看、选择、删除以及数据类型相关操作技巧,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql外键基本功能与用法详解

这篇文章主要介绍了mysql外键基本功能与用法,结合实例形式详细分析了mysql外键的基本概念、功能、用法及操作注意事项,需要的朋友可以参考下
收藏 0 赞 0 分享

Win10安装MySQL8压缩包版的教程

这篇文章主要介绍了Win10安装MySQL8压缩包版的教程,本文通过图文并茂的形式给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql视图原理与用法实例详解

这篇文章主要介绍了mysql视图原理与用法,结合实例形式详细分析了mysql视图的概念、原理、使用方法及操作注意事项,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql索引原理与用法实例分析

这篇文章主要介绍了mysql索引原理与用法,结合实例形式分析了mysql索引的基本概念、原理、用法及操作注意事项,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql触发器原理与用法实例分析

这篇文章主要介绍了mysql触发器原理与用法,结合实例形式分析了mysql触发器基本概念、原理、用法及操作注意事项,需要的朋友可以参考下
收藏 0 赞 0 分享
查看更多