三:出现的一个错误
在安装完MySQL的时候,我们现在一般都使用Navicat来连接数据库,可惜出现下面的错误:1251-Client does not support authentication protocol requested by server; consider upgrading MySQL client。

出现上述问题的原因是:mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password 把mysql用户登录密码加密规则还原成mysql_native_password

我安装的时候是使用的安装包去安装的,所以新建了几个用户,cmd命令,连接mysql,查询系统当中所有的用户。

1.查看MYSQL数据库中所有用户

mysql> SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;
2.修改加密规则,因为最新版的加密规则好像不一样,安装的过程当中是有提示的。

mysql> ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘password’ PASSWORD EXPIRE NEVER;
3.修改用户的认证规则

mysql> alter user '用户名'@'%' identified with mysql_native_password by '密码';
例如我的用户名是admin,密码是123456,那么,我修改的规则如下

mysql> alter user 'admin'@'%' identified with mysql_native_password by '123456';
其中还有'用户名'@'%'和'用户名'@'localhost'的区别,一个是任意连接,一个是本地连接。

4.刷新权限

mysql> flush privileges;
————————————————
版权声明:本文为CSDN博主「梦里梦不出梦里梦的梦」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_38455201/article/details/83024357

1251-Client does not support authentication protocol requested by server; consider upgrading MySQL client。的更多相关文章

  1. egg 连接 mysql 的 docker 容器,报错:Client does not support authentication protocol requested by server; consider upgrading MySQL client

    egg 连接 mysql 的 docker 容器,报错:Client does not support authentication protocol requested by server; con ...

  2. Client does not support authentication protocol requested by server; consider upgrading MySQL client

    出现错误 Client does not support authentication protocol requested by server; consider upgrading MySQL c ...

  3. UnhandledPromiseRejectionWarning: SequelizeConnectionError: Client does not support authentication protocol requested by server; consider upgrading MySQL client

    UnhandledPromiseRejectionWarning: SequelizeConnectionError: Client does not support authentication p ...

  4. node mysql问题:Client does not support authentication protocol requested by server; consider upgrading MySQL client!

    node后台 mysql处理模块(版本:2.16.0) 执行connect方法时报错: Client does not support authentication protocol requeste ...

  5. django.db.utils.OperationalError: (1251, 'Client does not support authentication protocol requested by server; consider upgrading MySQL client')

    1.打开MySQL: cmd里 net start mysql mysql -hlocalhost -uroot -p回车 进入mysql数据库 2. 命令如下: 1.use mysql; 2.alt ...

  6. MySQL 8.0 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码';

  7. docker安装mysql容器后,是用navicat连接报client does not support authentication protocol requested by server consider upgrading mysql client

    #进入容器 docker exec -it mysql bash#进入mysqlmysql -u root -p#重置密码ALTER USER 'root'@'%' IDENTIFIED WITH m ...

  8. Mysql8 连接提示 Client does not support authentication protocol requested by server; consider upgrading MySQL client 解决方法

    USE mysql;ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';FLUSH PR ...

  9. vscode Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

    vscode 连接 mysql 时出现这个错误 alter user 'root'@'localhost' identified with mysql_native_password by 'pass ...

随机推荐

  1. Servlet中@WebServlet属性详解

    感谢原文作者:想当一只小小攻城狮 原文链接:https://blog.csdn.net/weixin_45493751/article/details/100559683 在Servlet中,设置了@ ...

  2. UIKit绘图演练

    一般使用UIKit给我们提供的绘图来绘制一些文字,图片这些东西.     UIKit给我们提供画图的方法底层也是分为四步.所以也必须在drawRect方法当中去写.     1.如何画文字?      ...

  3. Spring系列12: `@Value` `@Resource` `@PostConstruct` `@PreDestroy` 详解

    本文内容 @Resource实现依赖注入 @Value详细使用 @PostConstruct @PreDestroy的使用 @Resource实现依赖注入 前面章节介绍了使用@Autowired注入依 ...

  4. 《PHP程序员面试笔试宝典》——如何应对面试官的“激将法”语言?

    如何巧妙地回答面试官的问题? 本文摘自<PHP程序员面试笔试宝典> "激将法"是面试官用以淘汰求职者的一种惯用方法,它是指面试官采用怀疑.尖锐或咄咄逼人的交流方式来对求 ...

  5. MindSpore多元自动微分

    技术背景 当前主流的深度学习框架,除了能够便捷高效的搭建机器学习的模型之外,其自动并行和自动微分等功能还为其他领域的科学计算带来了模式的变革.本文我们将探索如何用MindSpore去实现一个多维的自动 ...

  6. WebGL 与 WebGPU比对[4] - Uniform

    目录 1. WebGL 1.0 Uniform 1.1. 用 WebGLUniformLocation 寻址 1.2. 矩阵赋值用 uniformMatrix[234]fv 1.3. 标量与向量用 u ...

  7. C#Winform 注册使用全局快捷键详解

    C#.NET Winform 注册使用全局快捷键详解 借助于全局快捷键,用户可以在任何地方操控程序,触发对应的功能.但 WinForms 框架并没有提供全局快捷键的功能.想要实现全局快捷键需要跟 Wi ...

  8. MyBatis功能点一应用:二级缓存整合redis

    Mybatis提供了默认的cache实现PerpetualCache,那为什么还要整合第三方的框架redis?因为Mybatis提供的cache实现为单机版,无法实现分布式存储(即本机存储的数据,其他 ...

  9. Spring MVC拦截器(Interceptor)使用

    第一篇Spring MVC的小作文就是关于Interceptor的,而不是很多基础的东西呢,很无奈.因为实践的项目中用到了,用地不太好,导致重复跳转页面浏览器cookie溢出了. 这个过程中呢就将与I ...

  10. Vue 源码解读(2)—— Vue 初始化过程

    当学习成为了习惯,知识也就变成了常识. 感谢各位的 点赞.收藏和评论. 新视频和文章会第一时间在微信公众号发送,欢迎关注:李永宁lyn 文章已收录到 github 仓库 liyongning/blog ...