数据库从 mysql5.7 升级到 mysql8.4,部分场景出现以下错误提示:
Plugin 'mysql_native_password' is not loaded

原因是:mysql_native_password 插件(模式)在新版本中被弃用了,新模式为 caching_sha2_password,需要启用一下旧模式。

解决步骤:
1.连接到数据库后,用命令 SHOW PLUGINS 查看插件列表
可以看到插件【mysql_native_password】的状态为【DISABLED】
我们的需要将其状态改为【ACTIVE】,修改步骤在后面。

2.找到配置文件 my.ini 进行修改
配置文件位置举例:C:\ProgramData\MySQL\MySQL Server 8.4\my.ini
在my.ini最后一行添加:
mysql_native_password=ON

3.重启mysql服务,命令示例:
net start mysql84
net stop mysql84

4.再次连接到数据库,用命令 SHOW PLUGINS 查看插件列表
可以看到插件【mysql_native_password】的状态为【ACTIVE】

5.为用户启用旧的身份验证插件【mysql_native_password】
ALTER USER '账号'@'主机' IDENTIFIED WITH 'mysql_native_password' BY '密码';
FLUSH PRIVILEGES;
举例:
ALTER USER 'root'@'localhost' IDENTIFIED WITH 'mysql_native_password' BY 'root';
FLUSH PRIVILEGES;

此时,问题就解决了。

填坑 Plugin 'mysql_native_password' is not loaded的更多相关文章

  1. 2059 - Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(../Frameworks/caching_sha2_password.so, 2): image not found

    mac本地安装mysql后,navicat连接报错: - Authentication plugin ): image not found 解决方法 在控制台登陆后重新改下密码即可 ALTER USE ...

  2. 解决mysql for docker容器报错:Authentication plugin 'caching_sha2_password' cannot be loaded

    为图方便,懒得在mac上安装mysql了,一个是管理不方便,第二个是为了方便多机器同步开发环境.就使用docker安装了. 拉取mysql镜像 docker pull mysql 运行mysql实例 ...

  3. 【linux】Can't connect to local MySQL server through socket和Plugin 'auth_socket' is not loaded报错

    真的是一次吐血的经历,弄了两个多小时才弄好. 问题1:直接登陆root用户报错 ERROR 2002 (HY000): Can't connect to local MySQL server thro ...

  4. 2059-authentication plugin 'caching_sha2_password"cnnot bt loaded :mysql8.0数据库链接不上:

    问题:最近数据库出了问题,就重新安装了数据库8.0,8.0建立数据库时出现问题,错误提示: 2059-authentication plugin 'caching_sha2_password" ...

  5. authentication plugin caching_sha2_password cannot be loaded

    最近下载新的MySQL8.0 来使用的时候, 通过sqlyog.或者程序中连接数据库时,提示:Authentication plugin 'caching_sha2_password' cannot ...

  6. ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded

    问题: 连接Docker启动的mysql出现:ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be l ...

  7. [Xamarin]我的Xamarin填坑之旅(二)

    上一篇交代了我Xamarin填坑的背景,大概聊了聊第一步环境配置,第二步创建项目和开发框架选择.如果有一个可用的梯子,这部分基本不会出错. 接下来就具体聊一聊写代码的过程中遇到的一些事儿. 第三步是码 ...

  8. Kubernetes Fluentd+Elasticsearch+Kibana统一日志管理平台搭建的填坑指南

    在初步完成Kubernetes集群架构的建立后,通过搭建一些监控组件,我们已经能够实现 图形化的监控每个node,pod的状态信息和资源情况 通过scale进行replicateSet的扩展和伸缩 通 ...

  9. ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

    部署docker下的mysql时出现以下报错 [root@docker ~]# mysql -h192.168.30.22 -uroot -p Enter password: 出现报错: ERROR ...

  10. stm32填坑之旅 - stm32f103c8t6点亮板载贴片蓝色LED

    转载请注明:https://www.cnblogs.com/rockyf/p/11691622.html 开篇 开篇一定要精彩,不然路人不理睬!下述是笔者作为arm小白的填坑之旅 没错,这个之前一直从 ...

随机推荐

  1. Mybatis-plus 中Wrapper的使用

    mybatis plus条件构造器关系图 1.上图绿色框为抽象类abstract 2.蓝色框为正常class类,可new对象 3.黄色箭头指向为父子类关系,箭头指向为父类 QueryWrapper 继 ...

  2. 完美卸载Docker

    1,删除docker所在目录 rm -rf /etc/docker rm -rf /run/docker rm -rf /var/lib/dockershim rm -rf /var/lib/dock ...

  3. git push origin master和git push的区别

    1.git push origin master 指定远程仓库名和分支名. 2.git push 不指定远程仓库名和分支名. 3. 这两者的区别:git push是git push origin ma ...

  4. TypeScript 学习笔记 — 接口的使用(六)

    目录 一.函数接口参数 二.函数类型接口 三.函数混合类型 四.对象接口(最常用) 确定属性 可选属性 任意属性 只读属性 可索引接口 索引访问符 类接口 接口继承 构造函数类型 type 和 int ...

  5. odoo 为form表单视图添加chatter功能

    实践环境 Odoo 14.0-20221212 (Community Edition) 需求描述 如图,给表单新增一个类似聊天的窗口,当记录一些表单活动(本例为自动记录当前记录状态变化) 需求实现 模 ...

  6. 【MySQL】MGR高可用搭建

    MySQL8.0.27如何安装 https://www.cnblogs.com/mindzone/p/15450312.html 部署过程中各种问题可参考的解决方案 我遇见的搭建问题,解决方案参考下面 ...

  7. 【Mybatis】07 万用Map & 模糊查询细节

    这应该算一个补充点 在尚硅谷的Java笔记资料有专门的一起万用Map讲解 参考自:https://www.bilibili.com/video/BV1NE411Q7Nx?p=5 万用Map 我们可以使 ...

  8. 【Java,IDEA】配置文件快速生成

    比如这里的druid连接配置文件,和mybatis的mapper配置文件就是使用模版创建好的 在创建文件时会有选项选择:

  9. 【Layui】08 时间线 Timeline

    文档地址: https://www.layui.com/demo/timeline.html 常规时间线: <ul class="layui-timeline"> &l ...

  10. 基于MybatisPlus的简单分页查询和条件分页查询

    分页查询 分析: 分析文档要求 查看前端传递给后台的参数 分析参数进行编码 后台返回给前端的数据 思路 浏览器 - > Controller层 - > Service层 - > Ma ...