1251-Client does not support authentication protocol requested by server; consider upgrading MySQL client。
三:出现的一个错误
在安装完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。的更多相关文章
- 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 ...
- 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 ...
- UnhandledPromiseRejectionWarning: SequelizeConnectionError: Client does not support authentication protocol requested by server; consider upgrading MySQL client
UnhandledPromiseRejectionWarning: SequelizeConnectionError: Client does not support authentication p ...
- 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 ...
- 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 ...
- 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 '你的密码';
- 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 ...
- 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 ...
- 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 ...
随机推荐
- axios ajax fetch 区别以及优缺点
将jQuery的ajax.axios和fetch做个简单的比较,所谓仁者见仁智者见智,最终使用哪个还是自行斟酌 1.jQuery ajax $.ajax({ type: 'POST', url: ur ...
- Solon 1.6.21 发布,轻量级应用开发框架
关于官网 千呼万唤始出来: https://solon.noear.org .整了一个月多了...还得不断接着整! 关于 Solon Solon 是一个轻量级应用开发框架.支持 Web.Data.Jo ...
- Springboot+Redisson自定义注解一次解决重复提交问题(含源码)
前言 项目中经常会出现重复提交的问题,而接口幂等性也一直以来是做任何项目都要关注的疑难点,网上可以查到非常多的方案,我归纳了几点如下: 1).数据库层面,对责任字段设置唯一索引,这是最直接有效 ...
- 基于Hexo的博客管理恢复
若重装电脑或更换电脑后 该如何恢复博客的管理? 1.确保之前博客源代码文件夹及文件保存在公库或私库中 例如: 我这里采用的是闭源存放方案,故为私库 这是源码文件样式 2.在新电脑上重新安装git,no ...
- 从服务间的一次调用分析整个springcloud的调用过程(一)
首先我们知道springcloud是一个微服务框架,按照官方文档的说法,springcloud提供了一些开箱即用的功能: 1 分布式/版本化配置 2 服务的注册与发现 3 路由 4 服务到服务之间调用 ...
- C#项目版本号自定义位置自动向上增加小工具设计与实现
自从毕了业,好久没更新了,今天突发奇想,过来更新一下,嘻嘻! 一般在做版本升级时,要锁定版本号进行对比,然后联网检索可用的升级包信息,在用VS做C#项目组件版本管理时,是一个很麻烦的事,每次Relea ...
- 常用文本处理命令 & 三剑客之 sed
今日内容 文本处理命令 Linux 三剑客之 sed 内容详细 文本处理命令 1.sort : 文件内容排序 默认按照文件隔行内容的第一个字符大小进行排序(默认是升序) 默认输出文本结果 sort [ ...
- Solution -「HAOI 2018」「洛谷 P4491」染色
\(\mathcal{Description}\) Link. 用 \(m\) 种颜色为长为 \(n\) 的序列染色,每个位置一种颜色.对于一种染色方案,其价值为 \(w(\text{出现恰 ...
- java宝典笔记(一)
第四章java基础知识 4.1基本概念 一.java优点 1.面向对象(封装.继承.多态) 2.可移植性.平台无关,一次编译,到处运行.Windows,Linux,macos等.java为解释性语言, ...
- Java泛型的那些事
1.泛型概述 1.1.为什么使用泛型 没有泛型,在编写代码时只能使用具体类型或Object类型,无法做到使用者想要使用什么类型就是类型.比如:创建一个方法,形参需要指定需要使用的数据类型,在创建方法之 ...