报错:Client does not support authentication protocol requested by server; consider upgrading MySQL cli
IDEA启动项目登录时显示用户或密码错误
或者
连接mysql数据库时报错
原因:
mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password,所以可以需要改变mysql的加密规则
- 打开cmd窗口,登录mysql;
mysql -u root -h 127.0.0.1 -P3306 -p
- -u 后面root 为自己数据库的用户名
- -h 后面为 (mysql服务所在地址),我自己是在本机测试,所以为127.0.0.1
- -P (可选,默认3306 指定端口号)

会提示输入密码,输入自己数据库的密码,可以看到版本信息,则登录成功;
- 查看现有的用户
也可以输入命令再次查看版本 select version();
查看现有的用户
SELECT user,host,plugin from mysql.user;

- 设置加密方式
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你自己的密码';
- 让设置生效
FLUSH PRIVILEGES;
- 查看设置是否成功
SELECT user,host,plugin from mysql.user;

报错:Client does not support authentication protocol requested by server; consider upgrading MySQL cli的更多相关文章
- 安装mysql8.0.17时候报错1251-Client does not support authentication protocol requested by server; consider upgrading MySQL client
当mysql数据库安装时候选择的是加密密码时候,用navicat连接时候报错1521,这时候可以cmd之后登陆mysql执行下列代码就可以了 代码: mysql> alter user root ...
- 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 ...
- navicat连接远程数据库报错'client does not support authentication protocol requested by server consider ...'解决方案
[1.cmd终端连接远程mysql数据库方法] mysql -uhello -pworld -h192.168.1.88 -P3306 -Dmysql_oa mysql -u用户名 -p密码 -h ...
- 图文并茂解决Client does not support authentication protocol requested by server; consider upgrading MySQL
今天服务器部署node.js+mysql,调用接口报错ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protoc ...
- 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 ...
- nodejs连接mysql数据库,报错Client does not support authentication protocol requested by server的解决方法
最近想要尝试nodejs连接本地数据库,往全栈方向做一个小小的尝试,于是下载了一个 MySQL8.0,发现Navicat连接不上,结果就下载了mysql自身的Workbench,继续使用. 然而,难受 ...
- 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 ...
随机推荐
- ET介绍——事件机制EventSystem
事件机制EventSystem ECS最重要的特性一是数据跟逻辑分离,二是数据驱动逻辑.什么是数据驱动逻辑呢?不太好理解,我们举个例子 一个moba游戏,英雄都有血条,血条会在人物头上显示,也会在左上 ...
- 【VMware vSAN】创建vSAN Max集群并配置挂载远程数据存储。
VMware Explore 2023大会上,VMware正式发布了vSAN Max,这是VMware的一种全新分解存储架构,可以为vSphere集群提供PB级分解存储.vSAN Max是基于vSAN ...
- #根号分治,分块#洛谷 5309 [Ynoi2011] 初始化
题目传送门 分析 如果 \(x\) 比较大那么可以暴力修改,\(x\) 比较小的话可以用数组打标记 查询的时候对于暴力修改的部分可以分块,暴力修改的同时需要给块打标记 如果 \(x\) 比较小的情况, ...
- 使用OHOS SDK构建filament
参照OHOS IDE和SDK的安装方法配置好开发环境. 从gitee下载源码. 执行如下命令: git clone https://gitee.com/oh-graphics/filament.git ...
- 战码先锋直播预告丨参与文档贡献,开启OpenHarmony社区贡献之旅
OpenAtom OpenHarmony(以下简称"OpenHarmony")工作委员会首度发起「OpenHarmony开源贡献者计划」(本期OpenHarmony开源贡献者计划以 ...
- 三步就能在OpenHarmony中实现车牌识别
介绍 本车牌识别项目是基于开源项目 EasyPR(Easy to do Plate Recognition)实现.EasyPR 是一个开源的中文车牌识别系统,基于 OpenCV 开源库开发. 本项目使 ...
- js复制文字到剪切板
此方法仅适用于 IE demo <!DOCTYPE html> <html lang="en"> <head> <meta charset ...
- scala 生成指定日期范围的list
可以通过scala中的流处理,生成指定范围内的日期list import java.time.LocalDate def dateStream(fromDt:LocalDate):Stream[Loc ...
- 简单写一个eventbus
前言 闲暇之余,简单写一个eventbus. 正文 什么是eventbus? eventbus 是一个开源的发布订阅模式的框架,用于简化程序间不同组件的通信. 它允许不同组件间松耦合通信,组件之间不通 ...
- async与await暂停作用
1. async function Request () { await new Promise(res => { setTimeout(() => { console.log(1) re ...