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

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.

以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索client
, authentication
, support
, not
, MYSQL出现"
, does
"的解决方法
mysql出现乱码、mysql 字符出现次数、mysql统计出现次数、mysql查询出现次数、mysql 出现次数,以便于您获取更多的相关知识。

时间: 2024-08-06 05:04:51

MYSQL出现" Client does not support authentication "的解决方法_Mysql的相关文章

MYSQL 新版出现" Client does not support authentication protocol requested by server; consider..

client|mysql|request|server MYSQL 帮助:A.2.3 Client does not support authentication protocolMySQL 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

mysql登录报错提示:ERROR 1045 (28000)的解决方法_Mysql

本文分析了mysql登录报错提示:ERROR 1045 (28000)的解决方法.分享给大家供大家参考,具体如下: 一.问题: 公司linux系统的mysql数据库root用户设置过密码,但常常用命令'mysql -u root -p'登录报错,有时又能登录.登录报错信息为: [root@localhost ~]# mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localho

Mysql挂掉后无法重启报pid文件丢失的解决方法_Mysql

阿里云单核2G的配置挂着两个企业网站,访问量一般.最近每天几乎都会出现网站打不开显示数据库链接失败的问题. 多方寻求原因发现,mysql的pid文件缺失,并无法重启自建,后来也看了其他帖子说关闭日志什么的未果,查看系统日志发现,是因为内存满了导致mysql进程被杀,然后就一直挂起状态. Sep 25 11:33:48 iZ28jcqqr7lZ kernel: Out of memory: Kill process 23201 (mysqld) score 53 or sacrifice chil

CentOS下安装mysql时忘记设置root密码致无法登录的解决方法_Mysql

前言 昨天一天都是启动mysql时提示:The server quit without updating PID file,今天重装了mysql之后还是同样报错,然后恢复了一下/usr/my.cnf突然就可以启动了.(明明昨天/usr/my.cnf就是默认的,有个解决方法说改这个文件才改的) 然后现在就到没有设置root密码的问题了,搜了几个方法都不行,直到看到下面这个方法一才行. 解决方法一: # /etc/init.d/mysql stop # mysqld_safe --user=mysq

Mysql 报Row size too large 65535 的原因及解决方法_Mysql

报错信息:Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535 向mysql的表插件一个字段 类型为text时,或修改一个字段类型为text时,报出上面的错误.其实我对这个错误的原因理解也不是很深,给出一些我查到的解释吧 大意是数据表中有一个设定长度为64K的字段索引,当表中字段(不知道是字段名字还是什么)不能超过这个长度,65,535所说明的是针对的是整个表的

mysql Access denied for user ‘root’@’localhost’ (using password: YES)解决方法_Mysql

今天在启动mysql时出现以下问题: [root@www ~]# mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 网上的答案是各种各样的,最终解决问题的方法总结为以下,好多都是没有设置初始密码造成此问题的. 解决方法如下: [root@www ~]# service mysqld stop #先关闭mysql服务

MySQL中字符串与Num类型拼接报错的解决方法_Mysql

发现问题 图片地址如下 yun_qi_img/1473574486942944.jpg 需要实现的效果是要加上尺寸,如以下效果 yun_qi_img/1473574486942944.jpg|1200*675 一开始想当然使用 UPDATE tag_group SET cover = cover + '|1200*675' WHERE id = 1; 结果报错 Data truncation: Truncated incorrect DOUBLE value: 'yun_qi_img/14735

mysql修改密码的三方法和忘记root密码的解决方法_Mysql

方法1: 用SET PASSWORD命令 复制代码 代码如下: mysql -u rootmysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass'); 方法2:用mysqladmin 复制代码 代码如下: mysqladmin -u root password "newpass" 如果root已经设置过密码,采用如下方法 复制代码 代码如下: mysqladmin -u root password oldpas

MySQL命令行界面中出现字符错误提示的原因及解决方法_Mysql

ERROR 2019 (HY000): Can't initialize character set gb2312搞了好半天,MySQL都重装了两次,号悲剧... 之前设置了系统编码全都是UTF-8了的 vi /etc/sysconfig/i18n   LANG=zh_CN.UTF-8 LANGUAGE=zh_CN.UTF-8:zh_CN.GB2312:zh_CN SUPPORTED=zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en SYSFONT=lat0-s