三:出现的一个错误
在安装完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. js读取txt文件并下载

    //我在vue中测试, 可行, 这个只适用于google浏览器, ie需要xObject对象 // 下载txt if (/(txt)$/.test(name[1])) { var xhr = new ...

  2. iOS - TableViewCell分割线 --By吴帮雷

    千万别小看UI中得线,否则你的设计师和测试组会无休止地来找你的!!(如果是美女还好,如果是恐龙....) 在开发中运用最多的是什么,对,表格--TableView,之所以称作表格,是因为他天生带有分割 ...

  3. python使用泛型

    所谓的泛型, 就是将数据类型作为参数进行传递, 即在我们用的时候确定数据类型, 这是一种在面向对象语言中经常使用的特性 一般类使用 以SQLAlchemy举例 比如: 我们统一写个将数据保存到数据库的 ...

  4. SIMD编码/解码

    在看SEAL库和HElib库中经常在编码中碰到打包(batch)技术,另外还提到了SIMD编码技术,有点困惑,编码.打包.SIMD到底有什么关系? 编码 在CKKS方案中,因为明文空间在复数域上,简单 ...

  5. ios plist获取权限

    最近太忙了,没有时间写vue 这个权限获取有点坑,极不好记,所以备份一份 <key>NSVideoSubscriberAccountUsageDescription</key> ...

  6. 『无为则无心』Python面向对象 — 55、多层继承和继承中的私有成员

    目录 1.Python支持多层继承 (1)多层继承实现 (2)多层继承和多重继承区别 2.继承中的私有成员 (1)继承中父类私有属性和私有方法 (2)获取和修改私有属性值 1.Python支持多层继承 ...

  7. Java IO 技术

    文章目录 流的概念 IO 流类体系 InputStream / OutputStream Reader / Writer 文件字节流 文件字符流 缓冲字节流 缓冲字符流 字节数组流 数据流 转换流 序 ...

  8. 一个含有多个flag的图片(Misc)

    图片是来自一个老阿姨,然后这个图片是属于一个杂项题目,一个图片中包含十几个flag,格式为#....#,第一个flag就是图片一开始就放在上面的,可以直接看到. 然后文件名字也是一个flag, 将图片 ...

  9. Windows系统散列值获取分析与防范

    LM Hash && NTLM Hash Windows操作系统通常使用两种方法对用户的明文进行加密处理,在域环境中,用户信息存储在ntds.dit中,加密后为散列值.Windows操 ...

  10. [题解]Codeforces Round #519 - A. Elections

    [题目] A. Elections [描述] Awruk和Elodreip参加选举,n个人投票,每个人有k张票,第i个人投a[i]张票给Elodreip,投k-a[i]张票给Awruk.求最小的k,使 ...