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

2016-02-19 12:04 9 1 收藏

给自己一点时间接受自己,爱自己,趁着下午茶的时间来学习图老师推荐的MYSQL出现" Client does not support authentication "的解决方法,过去的都会过去,迎接崭新的开始,释放更美好的自己。

【 tulaoshi.com - 编程语言 】

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:

(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/bianchengyuyan/)
shell mysqlClient does not support authentication protocol requestedby 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: Start mysqld with the --old-passwords option. 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.

(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/bianchengyuyan/)

来源:http://www.tulaoshi.com/n/20160219/1599677.html

延伸阅读
MySQL-Proxy处在MySQL数据库客户和服务端之间的程序,它支持嵌入性脚本语言Lua。这个代理可以用来分析、监控和变换(transform)通信数据,它支持非常广泛的使用场景: ·负载平衡和故障转移处理 ·查询分析和日志 ·SQL宏(SQL macros) ·查询重写(query rewriting) ·执行shell命令 MySQL Proxy...
意外宝宝并非喜从天降 很多80后、90后将非计划 怀孕 美其名曰为喜从天降,视奉子成婚为水到渠成。然而事实并非想象那么完美,无数 新生儿 病例证明:这些来自于非计划怀孕的意外宝宝往往意味着胚胎命运多舛。 意外宝宝难保质量非计划怀孕导致孕前补充叶酸、接种疫苗等措施被耽误,胎儿质(图老师整理)量总体上比...
标签: 宝宝
宝宝自己玩:0-3岁的独立游戏 如果有一天,你发现宝宝一个人在房间里玩得不亦乐乎,你应该为他感到高兴,这是宝宝独自游戏的开始。千万别打破这个小小的私人空间,让他充分享受独自游戏的机会和乐趣。放手让宝宝自己玩独自游戏是宝宝自立的萌芽。爸爸妈妈要给孩子独立的私人空间和时间,放手让他们自己玩。这并不等于说父母可以对宝宝大撒把...
如何远离疲劳,避免“过劳死”呢?从个人自我保健的角度讲,要坚持做到以下几点: 1、坚持锻炼:运动能增加心肌收缩能力,增加机体免疫力,增强机体抗病的能力,还可以加快人体的新陈代谢,推迟神经细胞的衰老,帮助废物排除。 2、心情舒畅:烦闷、焦虑、忧伤是产生疲劳的内在因素。Tulaoshi.Com因此,要防止疲劳,保持充沛的精...
标签: 学习 孩子
如何让孩子主动学习 不少家长抱怨孩子学习不自觉,让人操心。不少老师也感觉到,孩子学习的依赖性特别强,从收拾书包到做作业,处处透着家长的影子。与此同时,孩子的自主学习能力越来越差。如果孩子缺乏自主学习的能力,会直接影响成绩的提高和自信心的形成,严重的还可能引起厌学情绪,家长应该引起关注。问题:学习依赖性强镜头一:幼儿园...

经验教程

115

收藏

76
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部