1251-Client does not support authentication protocol requested by server;consider upgrading MySQL cl

编程知识 更新时间:2023-05-02 05:33:54

今天使用navicat连接mysql的时候,跳了一个错误:1251-client does not support authentication protocol requested by server;consider upgrading MySQL client

解决方法:
以管理员身份进入CMD,然后启动mysql:

net start mysql

如下图所示

然后登录mysql:

mysql -u root -p

输入自己的mysql密码后,就登录mysql了

接下来查看一下用户信息:

select host,user,plugin,authentication_string from mysql.user;

用户信息如下图所示:

这里普及一个小知识:

  • host为 % 表示不限制ip
  • localhost表示本机使用
  • plugin非mysql_native_password 则需要修改密码

这里看到plugin全是需要修改密码的,所以接下来修改一下密码

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'newpassword';

大小写都一样,最后的newpassword为新密码,自己设置,密码修改后查看一下用户信息:

在navicat里面重新连接一下,使用新密码:

连接成功!

更多推荐

1251-Client does not support authentication protocol requested by server;conside

本文发布于:2023-04-26 07:13:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/631b6ec9d7bdc0b031319c7fa1d2a961.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:authentication   protocol   support   Client   MySQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 104659文章数
  • 26216阅读数
  • 0评论数