目录

原因

连接数据库的时候出现这个问题的解决方法

创建数据库连接池时解决方法


原因

使用客户端链接mysql数据库,如果数据库版本高于8.0,可能出现以上问题,因为8.0以前默认使用mysql_native_password身份验证机制,8.0以后使用caching_sha2_password方式

连接数据库的时候出现这个问题的解决方法

conn = mysql.connector.connect(host = "localhost", user = "root", passwd = "", database = "", auth_plugin = "mysql_native_password")

在连接后面添加:auth_plugin = "mysql_native_password"

创建数据库连接池时解决方法

import mysql.connector.pooling# 定义连接需要的参数,用字典封存,私有参数
__config = {"host":"localhost","port":3306,"user":"root","password":"00000","database":"vega","auth_plugin":'mysql_native_password'
}
import pymysql
# 创建连接池,定义最大连接数
try:pool = mysql.connector.pooling.MySQLConnectionPool(**__config,pool_size=10)
except Exception as e:print("创建连接池出现异常:",e)

在连接后面添加:auth_plugin = "mysql_native_password"

【数据库bug修复】——Authentication plugin ‘caching_sha2_password‘ is not supported相关推荐

  1. SQLAlchemy 报错 NotSupportedError: Authentication plugin ‘caching_sha2_password’ is not supported 解决方法

    报错内容 在使用 python SQLAlchemy 连接数据库时,遇到以下错误: NotSupportedError: Authentication plugin 'caching_sha2_pas ...

  2. 【纠错】——mysql Authentication plugin ‘caching_sha2_password‘ is not supported问题处理

    mysql Authentication plugin 'caching_sha2_password' is not supported问题处理 使用mysql8.0版本,登录失败,提示 Authen ...

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

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

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

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

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

  6. Unable to load authentication plugin ‘caching_sha2_password‘

    Mybatis反向生成报错 一.报错内容如下 Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin: ...

  7. 命令行连接mysql时出现Authentication plugin ‘caching_sha2_password‘ cannot be loaded: 找不到指定的模块

    命令行连接mysql时出现Authentication plugin 'caching_sha2_password' cannot be loaded: 找不到指定的模块. 通过如下命令进入数据库 m ...

  8. mysql8.x实践系列(3)Qt客户端连接mysql报错:Authentication plugin ‘caching_sha2_password‘ reported error

    一.现象描述 Qt客户端远程连接mysql8.x服务器,会报错: Authentication plugin 'caching_sha2_password' reported error:Authen ...

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

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

最新文章

  1. android studio资产目录,在Android Studio中设置单元测试的自定义资产目录
  2. 深度学习100例 | 第33天:迁移学习-实战案例教程
  3. 经典算法复现!(条件随机场)CRF原理及实现代码
  4. io-同步 异步 阻塞 非阻塞
  5. daterangepicker双日历插件的使用
  6. C++之new再探究
  7. 阿里云 centos mysql 5.6_关于centOS安装配置mysql5.6那点事
  8. 27. Spring Boot 部署与服务配置
  9. 百度云强势入围 2018 Q3 Forrester Wave,仅用两年成为公有云一方霸主
  10. C# WPD PortableDeviceApiLib获取便携设备列表
  11. python滑动验证_Python实现图片滑动式验证识别方法
  12. 《淘宝技术这十年》简评
  13. Spring Boot工程结构推荐
  14. 天空的颜色 363
  15. 张亚勤寄语哥伦比亚大学2020年毕业生:引领未知时代
  16. 字符个数统计 java
  17. jq实现标签单选、多选功能
  18. java 获取excel的行数_JAVA使用POI获取Excel的列数与行数
  19. aiohttp 高并发web服务_python后台——asyncio,aiohttp入门教程,多进程+asyncio
  20. U盘内文件变为快捷方式怎么办?【一招解决】

热门文章

  1. MapReduce操作HBase
  2. 验证dropdownlist必选
  3. 使用Null Object设计模式[转]
  4. 跨站点脚本(XSS)
  5. Ajax — 评论列表
  6. ZZUOJ 10508: 数列游戏IV
  7. Visual Studio Code 常用插件整理
  8. C#中ComboBox动态绑定赋值
  9. 学生信息管理系统中遇到的问题解析
  10. 反射小应用之DataTable和ListT互操作