这是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”错误的更多相关文章

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

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

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

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

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

  4. Unable to load authentication plugin 'caching_sha2_password'

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

  5. 连接mysql 出现:java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.

    数据测试的时候出现: 网上查资料说的是mysql5.x 版本和 8.x版本的区别: 5.7版本是:default_authentication_plugin=mysql_native_password ...

  6. 使用navicat连接mysql时报错:2059 - authentication plugin 'caching_sha2_password'

    首先从本地登录mysql数据库,进入mysql控制台,输入如下命令: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_passwo ...

  7. Navicat 连接MySQL数据库 报错2059 - authentication plugin 'caching_sha2_password'的解决办法

    #在数据库的命令行中输入以下代码即可解决,密码必须要修改 可以再次执行将密码改回来. use mysql; ALTER USER 'root'@'localhost' IDENTIFIED WITH ...

  8. navicat链接mysql 8 出现 2015 authentication plugin 'caching_sha2_password' 错误

    使用mysql自带的 MySQL 8.0 Command Line Client - Unicode 登录, 然后使用命令: alter user 'root'@'localhost' identif ...

  9. 【问题解决】连接mysql 8错误:authentication plugin 'caching_sha2_password

    在刚安装好mysql8,使用native连接的时候报错 authentication plugin 'caching_sha2_password'... 首先确保服务已开启,然后通过cmd命令进入my ...

随机推荐

  1. A New Defense Against Adversarial Images: Turning a Weakness into a Strength

    目录 概 主要内容 准则1 准则2 总策略 Hu S, Yu T, Guo C, et al. A New Defense Against Adversarial Images: Turning a ...

  2. 【MySQL作业】SELECT 数据查询——美和易思MySQL运算符应用习题

    点击打开所使用到的数据库>>> 1.查询指定姓名的客户(如"张晓静")的地址和电话号码. select address 地址, phone 电话号码 from c ...

  3. nginx 安装配置及使用 启动权限拒绝问题

    安装 yum install -y nginx 查看安装的路径 whereis nginx 可能会有所不同 需要根据自己的查看 执行目录:/usr/sbin/nginx 模块所在目录:/usr/lib ...

  4. 为什么要避免在 Go 中使用 ioutil.ReadAll?

    原文链接: 为什么要避免在 Go 中使用 ioutil.ReadAll? ioutil.ReadAll 主要的作用是从一个 io.Reader 中读取所有数据,直到结尾. 在 GitHub 上搜索 i ...

  5. spring security 登出操作 详细说明

    1.前言 这里专门 做 spring security 登出操作 的  详细记录 2.操作 (1)目录结构 (2)在security 拦截规则配置文件添加退出登录支持 源码 package com.e ...

  6. Java中Jar包调用命令行运行编译

    原文链接:https://www.toutiao.com/i6491877373942694413/ 记事本编写两个简单的类 文件结构目录 启动DOS,进入文件所在目录 进入到class所在文件的目录 ...

  7. 从内存管理原理,窥探OS内存管理机制

    摘要:本文将从最简单的内存管理原理说起,带大家一起窥探OS的内存管理机制,由此熟悉底层的内存管理机制,写出高效的应用程序. 本文分享自华为云社区<探索OS的内存管理原理>,作者:元闰子 . ...

  8. MySQL 中如何定位 DDL 被阻塞的问题

    经常碰到开发.测试童鞋会问,线下开发.测试环境,执行了一个DDL,发现很久都没有执行完,是不是被阻塞了?要怎么解决? 包括在群里,也经常会碰到类似问题:DDL 被阻塞了,如何找到阻塞它的 SQL ? ...

  9. Flowable实战(四)BPMN2.0 启动与结束事件

    一.BPMN2.0   BPMN2.0规范是一个标准,开源框架和不同供应商都遵循这份标准,使得最终用户不会因为依赖专有解决方案,而被供应商"绑架".有了BPMN2.0标准,不同解决 ...

  10. 《剑指offer》面试题49. 丑数

    问题描述 我们把只包含因子 2.3 和 5 的数称作丑数(Ugly Number).求按从小到大的顺序的第 n 个丑数. 示例: 输入: n = 10 输出: 12 解释: 1, 2, 3, 4, 5 ...