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 ...
随机推荐
- ARP数据包分析
转载请注明来源:https://www.cnblogs.com/hookjc/ 本机IP:192.168.0.1 (c0 a8 00 01)本机MAC:00-50-56-c0-00-01目标IP:19 ...
- iOS多线程总览 --By 吴帮雷
在iOS中每个进程启动后都会建立一个主线程(UI线程),这个线程是其他线程的父线程.由于在iOS中除了主线程,其他子线程是独立于Cocoa Touch的,所以只有主线程可以更新UI界面(新版iOS中, ...
- 【Gym101137K】Knights of the Old Republic(生成树 DP)
题目链接 大意 给定\(N\)个点\(M\)条边的一张图,其中: 每个点有两个属性\(A_i,B_i\),表示你需要至少\(A_i\)个士兵来攻占该点,而空投一个士兵至该点需要Bi的花费. 每条边都有 ...
- Linux运维-常用操作-培训用例
一.服务器环境 Centos 7.9 二.常用连接工具(免费) 1.Finalshell 2.MobaXterm 3.Putty + WinSCP 三.Linux 系统目录结构 /bin :是 Bi ...
- 基于GDAL库,读取.grd文件(以海洋地形数据为例)C++版
技术背景 海洋地形数据主要是通过美国全球地形起伏数据(GMT)获得,数据格式为grd(GSBG)二进制数据,打开软件通过是Surfer软件,surfer软件可进行数据的编辑处理,以及进一步的可视化表达 ...
- Solution -「ARC 125E」Snack
\(\mathcal{Description}\) Link. 把 \(n\) 种零食分给 \(m\) 个人,第 \(i\) 种零食有 \(a_i\) 个:第 \(i\) 个人得到同种零食数量 ...
- tip1:学习使用mybatis中使用mysql数据库的基本操作
1.查看mysql服务是否启动: 2.root用户链接数据库:mysql -u root -p,随后输入正确的密码即可. 3.root用户创建数据库: 4.查看已建数据库:show databases ...
- tip5:tomcat9日志及控制台中文乱码
1.conf/logging.properties文件所有UTF-8相关全部注释 2.bin/catalina.bat文件中添加set "JAVA_OPTS=-server -Dfile.e ...
- RadonDB MySQL on K8s 2.1.2 发布!
RadonDB MySQL on Kubernetes 于 2 月 17 日发布了新版本 2.1.2 .该版本在节点的重建.增删等方面进行了全面升级. 致谢: 首先感谢 @andyli029 @ace ...
- [LeetCode]1342. 将数字变成 0 的操作次数
给你一个非负整数 num ,请你返回将它变成 0 所需要的步数. 如果当前数字是偶数,你需要把它除以 2 :否则,减去 1 . 示例 1: 输入:num = 14 输出:6 解释: 步骤 1) 14 ...