连接mysql出现“Unable to load authentication plugin 'caching_sha2_password”错误
这是mysql 8.0版本才出现的问题,原因是mysql 8.0 默认使用 caching_sha2_password 身份验证机制 —— 从原来的 mysql_native_password 更改为 caching_sha2_password。
解决办法:
可以更换版本但是感觉治标不治本,建议修改身份验证机制
1、登陆mysql
在mysql的bin目录下打开cmd(默认是C:\Program Files\MySQL\MySQL Server 8.0\bin)
输入:mysql -uroot -p 接着输入密码
2、登陆mysql成功之后输入:
alter user 'root'@'localhost' identified by 'root' password expire never;
alter user 'root'@'localhost' identified with mysql_native_password by 'root'
flush privileges;
其中root为mysql密码
完美解决
连接mysql出现“Unable to load authentication plugin 'caching_sha2_password”错误的更多相关文章
- DBeaver连接MySQL 8.0显示"Unable to load authentication plugin 'caching_sha2_password'."错误的问题
下载MySQL绿色版本mysql-8.0.12-winx64,手动安装完成后.使用DBeaver连接提示"Unable to load authentication plugin 'cach ...
- 连接mysql客户端报错: java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'
报这个错可能是因为用了低版本的的客户端.驱动连接高版本的mysql服务器. 解决方式有三种:升级客户端版本.修改服务端认证方式和适应服务端认证方式. 我是通过升级客户端版本解决,参考一下链接: Upg ...
- java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.
原来是mysql5.X,升级到8.X,连接数据库就报错: Unable to load authentication plugin 'caching_sha2_password'. 原因分析: 可能为 ...
- Unable to load authentication plugin 'caching_sha2_password'
Caused by: com.mysql.cj.core.exceptions.WrongArgumentException: Unable to load authentication plugin ...
- 连接mysql 出现:java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.
数据测试的时候出现: 网上查资料说的是mysql5.x 版本和 8.x版本的区别: 5.7版本是:default_authentication_plugin=mysql_native_password ...
- 使用navicat连接mysql时报错:2059 - authentication plugin 'caching_sha2_password'
首先从本地登录mysql数据库,进入mysql控制台,输入如下命令: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_passwo ...
- Navicat 连接MySQL数据库 报错2059 - authentication plugin 'caching_sha2_password'的解决办法
#在数据库的命令行中输入以下代码即可解决,密码必须要修改 可以再次执行将密码改回来. use mysql; ALTER USER 'root'@'localhost' IDENTIFIED WITH ...
- navicat链接mysql 8 出现 2015 authentication plugin 'caching_sha2_password' 错误
使用mysql自带的 MySQL 8.0 Command Line Client - Unicode 登录, 然后使用命令: alter user 'root'@'localhost' identif ...
- 【问题解决】连接mysql 8错误:authentication plugin 'caching_sha2_password
在刚安装好mysql8,使用native连接的时候报错 authentication plugin 'caching_sha2_password'... 首先确保服务已开启,然后通过cmd命令进入my ...
随机推荐
- Theoretically Principled Trade-off between Robustness and Accuracy
目录 概 主要内容 符号说明 Error Classification-calibrated surrogate loss 引理2.1 定理3.1 定理3.2 由此导出的TRADES算法 实验概述 代 ...
- [C++]C++ STL库函数大全
#include <assert.h> //设定插入点 #include <ctype.h> //字符处理 #include <errno.h> //定义错误码 # ...
- Java面向对象笔记 • 【第8章 内部类和泛型】
全部章节 >>>> 本章目录 8.1 内部类 8.1.1 内部类概述 8.1.2 内部类使用 8.1.3 实践练习 8.2 静态内部类 8.2.1 静态内部类的实现 8.2 ...
- springboot单元测试为什么排除junit-vintage-engine
https://blog.csdn.net/Ber_Bai/article/details/117001443 如果不排除,就需要使用@RunWith注解? 25-springboot整合单元测试指定 ...
- spring cloud Zuul + 路由熔断【服务降级】 --- 心得
1.前言 刚入门 时,使用 ribbon + hystrix + restTemplate ,实现了简单的 接口访问 + 客户端负载均衡 + 服务熔断保护 : 然后学习了 feign ,整合了 r ...
- HTML5元素
1.1结构元素 HTML5定义了一组新的语义化标签,目前主流浏览器均已支持,语义化标签使用标记元素的内容,虽然可以使用原有标签替换,但是它可以简化HTML页面设计,并且也为搜索引擎在抓取和索引网页的时 ...
- Redis可视化内存分析工具--RDR:查看Redis中key的占用情况
RDR(redis datareveal)是一个解析redis rdbfile的工具.与redis-rdb-tools 相比,RDR 是由 golang 实现的,速度要快得多(5GB rdbfile ...
- Termux搭建hexo博客并部署到GitHub
Termux搭建hexo博客并部署到GitHub 安装 termux-change-repo apt update apt install git && nodejs &&am ...
- 网络编程-TCP连接的建立与终止
TCP是一个面向连接的协议.无论哪一方向另一方发送数据之前,都必须先在双方之间建立一条连接. 1.建立连接 请求端(通常称为客户)发送一个 SYN 段指明客户打算连接的服务器的端口,以及初始序号( I ...
- sql多行合并一列
with a as( select * from( select 1 userId , '天津' province union select 1 userId , '北京' union select ...