\"1251 – Client does not support authentication pr

技术交流17年前 (2007)发布
55 0

\”1251 – Client does not support authentication protocol requested by server; consider upgrading MySQL client\”的解决方法

有人用这个软件吗?MySQL-Front
faq-it.org/mysql/ 我在用root帐户连接mysql数据库时提示有错误如下:
1251 – Client does not support authentication protocol requested by server;
consider upgrading MySQL client
我的数据库是可以用。但匿名帐户却可以连接

—————————————————————
在更新到 4.1.17 版本的 MySQL 后,发现需要使用 MySQLi 扩展方能正常使用数据库,否则会出现 1251 – Client does not support authentication protocol requested by server; consider
upgrading MySQL client 的提示,这个很纳闷,我没有研究具体的问题,只是切换到 MySQLi 扩展,其实在给 root 加上密码前还是可以使用 MySQL 扩展的,可是给 root 加上密码后就出现了上述客户端版本太低的提示。

  目前已知解决方法:

先用root登录MYSQL服务器,执行

mysql>set password for user1@”localhost”=old_password(‘yourPassword’);

  原因是因为你使用的mysql服务器版本中使用了新的密码验证机制,这需要客户端的版本要在4.0以上,原来的密码函数被改为old_password();,这样使用password()生成的密码在旧的版本上的客户端就不好使了,而PHP中的MYSQL客户端都是3.23的(当然,mysqli的扩展除外),问题就在这了。

問題描述:
連接Mysql時,當密碼正確時提示1251錯誤:
#1251 – Client does not support authentication protocol requested by server; consider
upgrading MySQL client
密碼不正確時,則提示:
#1045 – Access denied for user ‘root’@’localhost’ (using password: NO)原因:
由于MySQL 4.1 及其后版本验证协议使用的密码哈希算法与老的客户端不兼容,在PHPMYADMIN里用正确密码登陆也会提示:#1251错误.解決方法:打開mysql客戶端,輸入以下兩種方法之一即可
第一種:SET PASSWORD FOR ‘dbuser’@”localhost”=OLD_PASSWORD(‘yourPassword’);第二種:mysql> Update mysql.user SET Password = OLD_PASSWORD(‘newpwd’)-> Where Host = ‘some_host’ AND User = ‘some_user’;mysql> FLUSH PRIVILEGES;

© 版权声明

相关文章

暂无评论

  • Aewen
    Aewen 游客

    How are you .I'm Aewen.I'm come from HongKong.The first time write Comments. I saw your video at yesterday night.You show good, I hope you can sing more than Beijing Opera.I think this is more suitable to your development.Thanks.2.12.07

    回复
  • Aewen
    Aewen 游客

    How are you .I'm Aewen.I'm come from HongKong.The first time write Comments. I saw your video at yesterday night.You show good, I hope you can sing more than Beijing Opera.I think this is more suitable to your development.Thanks.2.12.07

    回复