数据测试的时候出现:

网上查资料说的是mysql5.x 版本和 8.x版本的区别;

5.7版本是:default_authentication_plugin=mysql_native_password

8.x版本就是:default_authentication_plugin=caching_sha2_password

有网友说是 将my.ini 中的配置改成5.7 就可以了,但是my.ini在哪儿呢。。。。

安装目录:C:\Program Files\MySQL\MySQL Server 8.0 没有发现ini文件;

又继续查找。 结果是在隐藏的 programdata文件夹下面。。在win+r 出现运行里面输入 %programdata% ,文件夹就出来了;

终于找到,感激涕零啊。马上修改ini中的配置,重新服务器,发现还是不行。。。

继续Google。。。终于找到。mysql驱动已经更新适配了caching_sha2_password 的密码规则,升级到最新版本就可以了。

改为 :

<version>8.0.11</version>
重新启动java 服务器,连接成功!
---------------------
作者:奋进2018
来源:CSDN
原文:https://blog.csdn.net/waterflying2015/article/details/81047128
版权声明:本文为博主原创文章,转载请附上博文链接!

连接mysql 出现:java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.的更多相关文章

  1. 连接mysql客户端报错: java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'

    报这个错可能是因为用了低版本的的客户端.驱动连接高版本的mysql服务器. 解决方式有三种:升级客户端版本.修改服务端认证方式和适应服务端认证方式. 我是通过升级客户端版本解决,参考一下链接: Upg ...

  2. java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.

    原来是mysql5.X,升级到8.X,连接数据库就报错: Unable to load authentication plugin 'caching_sha2_password'. 原因分析: 可能为 ...

  3. Unable to load authentication plugin 'caching_sha2_password'

    Caused by: com.mysql.cj.core.exceptions.WrongArgumentException: Unable to load authentication plugin ...

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

  5. 连接mysql出现“Unable to load authentication plugin 'caching_sha2_password”错误

    这是mysql 8.0版本才出现的问题,原因是mysql 8.0 默认使用 caching_sha2_password 身份验证机制 -- 从原来的 mysql_native_password 更改为 ...

  6. 【MySQL】java.sql.SQLException: The server time zone value

    错误:Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: The se ...

  7. JDBC获取连接抛出java.sql.SQLException: The server time zone...

    今天尝试数据库,代码确实没问题就是给了给这个东西 java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecogniz ...

  8. 更新MySQL数据库( java.sql.SQLException: No value specified for parameter 1) 异常 解决方法

    package com.swift; import java.io.File; import java.sql.Connection; import java.sql.PreparedStatemen ...

  9. (办公)mysql连接不上(java.sql.SQLException: null, message from server: "Host 'LAPTOP-O0GA2P8J' is not allowed to connect to this MySQL server")(转)

    转载自csdn文章:https://blog.csdn.net/Tangerine_bisto/article/details/803461511.对所有主机进行访问授权 GRANT ALL PRIV ...

随机推荐

  1. Windows Mysql安装

    一.从https://dev.mysql.com/downloads/windows/installer/5.6.html下载MySQL Installer 二.直接点击默认安装

  2. python3 + selenium 运行过程中进行截图

    使用driver.get_screenshot_as_file方法("D:/aaac.png")括号中为需要存放的路径及图片名称 from selenium import webd ...

  3. BBC记录片之非洲4

  4. Mysql查询出所有列名

    select group_concat(COLUMN_NAME Separator ',') as COLUMN_NAME from information_schema.COLUMNS where ...

  5. hdu 1025 上面n个点与下面n个点对应连线 求最多能连有多少条不相交的线 (LIS)

    题目大意有2n个城市,其中有n个富有的城市,n个贫穷的城市,其中富有的城市只在一种资源富有,且富有的城市之间富有的资源都不相同,贫穷的城市只有一种资源贫穷,且各不相同,现在给出一部分贫穷城市的需求,每 ...

  6. zookeeper单机集群搭建

    1. 下载zookeeper 参考官方文档下载一节:https://zookeeper.apache.org/doc/current/zookeeperStarted.html#sc_Download ...

  7. POJ - 1185 敌兵炮阵

    POJ - 3254 中文题.. 思路:这题可把我恶心坏了,我刚开始的思路其实是正确的... 首先我想开个dp[i][s1][s2]保存到 i行 为止当前行状态为s1,上一行状态为s2 的最大个数,然 ...

  8. Unity 之 中文乱码

    更改 C#脚本的编码格式: 文件 -> 高级保存选项 -> Unicode

  9. 【*】CAS 是什么,Java8是如何优化 CAS 的

    文章结构 前言 想要读懂 Java 中的并发包,就是要先读懂 CAS 机制,因为 CAS 是并发包的底层实现原理.本文主要讨论  CAS 是如何保证操作的原子性的  Java8 对 CAS 进行了哪些 ...

  10. Visual Studio 2017 版本 15.5.5

    Visual Studio 2017 版本 15.5.5 已修复的问题 (1)Xamarin 应用会引发“Cannot access a disposed object. Object name: ' ...