报错: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 ...
随机推荐
- 【已解决】idea编译器插入数据到数据库乱码以及jsp页面乱码的解决方法
1.jsp页面需要设置编码格式为utf-8 1 <%@ page contentType="text/html;charset=UTF-8" language="j ...
- 实现基于TCP的服务端/客户端
服务端套接字创建过程 第一步:调用socket函数创建套接字 //成功时返回文件表述符,失败时返回-1 int socket(int __domain, int __type, int __proto ...
- #KM算法#UVA11383 Golden Tiger Claw
题目 给定 \(n*n\) 的矩阵,现在给每行安排一个权值 \(x_i\),给每列安排一个权值 \(y_j\), 使得 \(x_i+y_j\geq a_{i,j}\),并且使 \(\sum_{i=1} ...
- #离线#洛谷 5358 [SDOI2019]快速查询
题目传送门 分析 由于询问次数很多,只能离线去做,考虑全局的操作都可以打标记. 对于单点的操作,实际上的数为 \(x'=x*Mul+Add\) 由于这两个标记单独撤销比较困难, 不妨开一个数组直接维护 ...
- docker笔记之安装
本文于2017年上半年完成,发布在个人博客网站上. 考虑个人博客因某种原因无法修复,于是在博客园安家,之前发布的文章逐步搬迁过来. 最近由于工作关系,接触到了docker技术.为了对docker有更多 ...
- C/C++ 项目构建指南:如何使用 Makefile 提高开发效率
Makefile是一个常用的自动化构建工具,它可以为开发人员提供方便的项目构建方式.在C/C++项目中,Makefile可以用来编译.链接和生成可执行文件.使用Makefile的好处是可以自动执行一系 ...
- Spring Boot 嵌入式服务器、Hibernate 关系和 Spring Data 全解析
嵌入式服务器 Spring Boot 的嵌入式服务器功能是一项方便而强大的功能,它允许你在应用程序中直接运行 Web 服务器,无需将其部署到单独的独立 Web 服务器中.这使得开发.测试和部署 Web ...
- HMS Core助力同程旅行,打造更贴心的用户出行体验
作为中国在线旅行行业的创新者,同程旅行聚焦年轻.时尚.个性的消费群体,致力于为用户提供更便捷.聪明.安全的出行服务.近年来,同程旅行通过人工智能等创新科技的应用将平台原本的交易撮合角色转变为" ...
- C++调用Python-1:hello world
#include "Python.h" #include <iostream> using namespace std; int main(int argc, char ...
- HDC技术分论坛:ArkCompiler(方舟编译器)原理解析
作者:xianyuqiang 编译器首席架构师 ArkCompiler(方舟编译器)是组件化.可配置的多语言编译和运行平台,它既能支撑单一语言运行环境,也能支撑多种语言组合的运行环境.它目前主要支持的 ...