Mybatis反向生成报错

一、报错内容如下

Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:
1.3.5:generate (default-cli) on project seckill:
Unable to load authentication plugin 'caching_sha2_password'.

二、原因(可以直接看解决方式,改原因纯属猜测,后期找文档查原因)

1、数据库中的mysql数据库下的user表的加密方式,我们在设置mysql的初始密码是通过“caching_sha2_password”插件进行加密


2、而我们设置mybatis生成方式的密码的时候传递到数据库加密方式是使用数据库本身的加密方式(mysql_native_password),所以导致出现该错误

三、解决方式

1、上面找到了原因就按照这个思路解决,将密码的加密方式修改成数据库本身的加密方式(mysql_native_password),可以使用下面的SQL语句进行加密

ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘Capuda12345’;


2、最后就可以正常生成

Unable to load authentication plugin ‘caching_sha2_password‘相关推荐

  1. SpringBoot连接Mysql数据库遇到Unable to load authentication plugin ‘caching_sha2_password解决方案

    遇到问题 o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: S1009 o.h.engine.jdbc.spi.SqlE ...

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

    错误描述 java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.at com.mysq ...

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

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

  4. 项目实战解决 java.sql.SQLException: Unable to load authentication plugin ‘caching_sha2_password‘.

    连接的安装的msql 数据库和连接数据库的代码jar包 不一致到 我这边myql 8的版本 <!--访问mysql--><!--JDBC--><!-- MySql 5.5 ...

  5. 【问题篇】Springboot解决报错“java.sql.SQLException: Unable to load authentication plugin ‘caching_sha2_passw”

    场景:从代码仓库拉取以前的代码,运行时发现报错"java.sql.SQLException: Unable to load authentication plugin 'caching_sh ...

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

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

  7. Navicat连接MySQL,出现2059 - authentication plugin ‘caching_sha2_password‘的解决方案

    Navicat连接MySQL,出现2059 - authentication plugin 'caching_sha2_password'的解决方案 参考文章: (1)Navicat连接MySQL,出 ...

  8. 【解决】Authentication plugin 'caching_sha2_password' cannot be loaded

    2059 Authentication plugin 'caching_sha2_password' cannot be loaded 请直接执行以下代码,并注意替换用户名和密码 ALTER USER ...

  9. ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password‘ cannot be loaded

    场景 Docker中部署Mysql8数据库: Docker中部署Mysql8数据库_BADAO_LIUMANG_QIZHI的博客-CSDN博客 使用Docker部署Mysql8的服务器之后,使用本地的 ...

最新文章

  1. Magento(麦进斗)安装问题
  2. “阿里味” PUA 编程语言火上GitHub热榜,标星2.7K!
  3. 如何在vue中使用sass
  4. ssh根据姓名查询的时候报错java.lang.IndexOutOfBoundsException: Remember that ordinal parameters are 1-based!
  5. JavaFX技巧14:StackPane子项-隐藏但不消失
  6. Python语法糖之:列表解析、集合解析和字典解析
  7. 双系统 android 华硕,华硕发布Duet TD300,首款真正Windows+安卓双系统笔记本
  8. 利用grep和awk来分析nginx日志
  9. Spring的OpenEntityManagerInViewFilter
  10. linux程序设计第四版中文pdf下载地址
  11. PHP TOP5开源小程序商城盘点
  12. 工行软开和中行软开_工行软开怎么样啊待遇如何,知道的说下啊
  13. 免费高效的WhatsApp助手
  14. Android、Python实现微信运动
  15. 文件上传5-uploads靶场
  16. 教你如何卷积操作进行边缘检测,基础必备
  17. 怎么删除拨号连接,取消掉宽带拨号?
  18. goldendict for linux,GoldenDict(for Linux)配置无道词典
  19. SQL基础语法_刘世民
  20. 计算机视觉会议(CVPR,ECCV,ICCV,NIPS,AAAI,ICLR等)

热门文章

  1. hadoop的fs shell命令
  2. Wifi Direct 修改群组名称特别注意
  3. 教师很有用的参考网站
  4. 【JZOJ 省选模拟】我的朋友们
  5. org.activiti.engine.ActivitiIllegalArgumentException: inputStream for resource '**' is null 的解决办法
  6. 即时聊天表情功能的实现
  7. 【C++】1074:津津的储蓄计划(信息学奥赛)
  8. openjudge 1.5.22 津津的储蓄计划
  9. 2018有赞校招笔试题
  10. 全自动模拟布局设计的挑战和机遇