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

今天使用 typeorm 连接 mysql8.0.17 出现错误,出现的错误就是 Client does not support authentication protocol requested by server; consider upgrading MySQL client . 出现的原因 mysql8 之前的版本中加密规则是 mysql_native_password,而在 mysql8 之后,加密规则是 caching_sha2_password

解决方法

  1. 升级 navicat 驱动
  2. 把 mysql 用户登录密码加密规则还原成 mysql_native_password

使用方法 2 解决

查找 mysql 安装位置,我的使用 homebrew 安装的,所以可以直接使用 brew 命令进行查找

brew info mysql

可以查到 /usr/local/Cellar/mysql/8.0.17_1 (284 files, 272.4MB) 这是安装位置, 进入 mysql 的安装目录下的 bin 目录

cd /usr/local/Cellar/mysql/8.0.17_1
cd bin
mysql -u root -p

输入密码获取权限,之后接着输入

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新一下用户的密码
FLUSH PRIVILEGES; #刷新权限

再次进行连接,重新输入新的账号密码

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. UnhandledPromiseRejectionWarning: SequelizeConnectionError: Client does not support authentication protocol requested by server; consider upgrading MySQL client

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

  3. 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 ...

  4. 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 '你的密码';

  5. 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 ...

  6. 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 ...

  7. 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 ...

  8. 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 ...

  9. 1251-Client does not support authentication protocol requested by server; consider upgrading MySQL client。

    三:出现的一个错误在安装完MySQL的时候,我们现在一般都使用Navicat来连接数据库,可惜出现下面的错误:1251-Client does not support authentication p ...

随机推荐

  1. net core 下 接受文件 测试

    /* IFormFileCollection Files 再Request对象下的From对象下的Files对象 public interface IFormFileCollection : IRea ...

  2. js能否上传文件夹

    文件夹上传:从前端到后端 文件上传是 Web 开发肯定会碰到的问题,而文件夹上传则更加难缠.网上关于文件夹上传的资料多集中在前端,缺少对于后端的关注,然后讲某个后端框架文件上传的文章又不会涉及文件夹. ...

  3. 【转载】mysqld_safe Directory ‘/var/run/mysqld’ for UNIX socket file don’t exists.

    This is about resetting the MySQL 5.7 root password in Ubuntu 16.04 LTS You probably tried something ...

  4. VirtualBox NAT Host-only模式下,自动分配IP上网。

    修改宿主机上,virtualbox自建虚拟网卡Host-Only 2. 因为我使用了两个适配器,所以这两个适配器的名字分别是ifcfg-eth0, ifcfg-eth1. ifcfg-eh0一般默认就 ...

  5. Springboot入门:

    Springboot入门: 1.springboot是基于spring的全新框架,设计目的:简化spring应用配置和开发过程. 该框架遵循“约定大于配置”原则,采用特定的方式进行配置,从而事开发者无 ...

  6. esLint——规范你的代码(转)

    团队协作时,若是团队的代码风格统一,能够大大减少沟通成本. 什么是 ESLint ? ESLint 是在 ECMAScript/JavaScript 代码中识别和报告模式匹配的工具,它的目标是保证代码 ...

  7. 不使用spring-boot-starter-parent进行依赖的版本管理

    spring-boot-starter-parent 提供了Dependency Management 进行项目依赖的版本管理,默认的资源过滤和插件配置. 但是,当需要将其他项目作为parent 的时 ...

  8. 用JQuery获取事件源怎么写

    $(".btn").click(function(e){ // e 就是事件对象 e.target; // 事件的目标 dom e.currentTarget; // 事件处理程序 ...

  9. Java源码阅读-Integer(基于jdk1.8)

    public final class Integer extends Number implements Comparable<Integer> Integer 由final修饰了,所以该 ...

  10. ECMA Script 6新特性之解构赋值

    1.基本概念用法 1.1解构赋值:ES6允许按照一定模式,从数组和对象中提取值,对变量进行赋值. var a = 1; var b = 2; var c = 3; /*上述赋值语句用解构赋值为*/ v ...