出现错误 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. js 反斜杠 处理

    var t = jsonstr.replace(/\\/g,"\\\\\\\\"); --\\ 表示 代码 输出 \' 单引号 \" 双引号 \& 和号 \\ 反 ...

  2. Python学习:Python设计模式-单例模式

    一.单例模式存在的意义 在这里的单例就是只有一个实例(这里的实例就像在面向对象的时候,创建了一个对象也可以说创建了一个实例),只用一个实例进行程序设计,首先我们可以了解一下什么时候不适合使用单例模式, ...

  3. psdash-为开发、测试人员提供简单的方法,在web界面查看服务器的运行情况(网络,带宽,磁盘,CPU), 同时可以在web界面查看日志

    psdash是linux的系统信息web指示板主要由使用数据psutil——由此得名. github地址:https://github.com/Jahaja/psdash 特性 安装 开始 配置 截图 ...

  4. 【canvas学习笔记八】像素操作

    ImageData对象 ImageData对象包含了一个区域内的canvas的像素信息.它包含以下可读属性: width canvas的宽度,单位是像素. height canvas的高度,单位是像素 ...

  5. cin.clear()、cin.sync()

    看机器学习时,发现之前学的C++代码忘了,cin.clear().cin.sync() cin.clear():将流中的所有状态值都重设为有效值 cin.sync():清空流 这个很有意思,如果没有c ...

  6. 腾讯这套SpringMVC面试题你懂多少(面试题和答案)

    1.什么是 SpringMvc? 答:SpringMvc 是 spring 的一个模块,基于 MVC 的一个框架,无需中间整合层来整 2.Spring MVC 的优点: 答:1)它是基于组件技术的.全 ...

  7. nginx检查报错:nginx: [emerg] "server" directive is not allowed here in

    想检查一个配置文件是否正确,-c 指定之后发现有报错,如下: [root@op-2:~# nginx -t -c /etc/nginx/conf.d/default.conf nginx: [emer ...

  8. 四、IDEA创建SpringBoot项目

    1.从官网下载之后直接导入IDEA: 下载完成解压之后如下图: IDEA导入该项目: 之后一路next即可 导入成功之后你可能会发现左下角一直有个进度条在进行,傻傻的同学可能以为是在下载jar包,下个 ...

  9. 在windows下使用Mingw搭建模拟Linux

    1.到官网下载最新版Mingw 2.点击安装,最好选择默认路径,如果不是的话,路径中一定不能有空格. 3.选择安装,mingw-developer-toolkit.mingw32-base.mingw ...

  10. 将ubuntu系统录到u盘上

    可以使用bootice工具对u盘分区,并隐藏,然后把系统录到隐藏分区,ubuntu只需要1.5G即可.bootice很强大 录制工具可选的有Universal USB Install.UltraISO ...