首页 > 数据库 >mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is

mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is

时间:2024-05-13 23:31:10浏览次数:18  
标签:sha2 errors plugin connector mysql caching password

今天将程序部署到服务器,遇到

mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported

问题产生的原因:

  从MySQL 8.0开始,默认的用户认证插件从mysql_native_password变成了caching_sha2_password

查看现有的用户

mysql> select user, host, plugin from mysql.user;
+------------------+-----------+-----------------------+
| user | host | plugin |
+------------------+-----------+-----------------------+
| root | % | mysql_native_password |
| test1| % | caching_sha2_password |
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session | localhost | caching_sha2_password |
| mysql.sys | localhost | caching_sha2_password |
+------------------+-----------+-----------------------+

使用连接mysql的账号test1加密规则为 caching_sha2_password

修改加密规则

ALTER USER 'test1'@'%' IDENTIFIED WITH 'mysql_native_password' BY 'password';
FLUSH PRIVILEGES;

更新mysql-connector库

pip install --upgrade mysql-connector-python

 

 

 

 

 

  

标签:sha2,errors,plugin,connector,mysql,caching,password
From: https://www.cnblogs.com/baby123/p/18190298

相关文章

  • Go语言异常处理:自定义错误【errors.New+panic】
    程序本身抛出的异常信息不是太友好,我们可以自定义错误或者异常的信息,需要使用errors包中的New函数来包装一下异常或错误信息;在使用内置函数panic(err),把异常信息后面的程序执行终止掉,因为再执行后面的程序也没有意义了。 packagemainimport"fmt"import"errors"funcma......
  • jenkins plugin 开发简单说明
    属于一个简单的学习,基于了官方提供的脚手架,运行一个简单测试插件,了解下开发流程基于脚手架的简单项目创建使用archetype会提示选择的模版mvn-Uarchetype:generate-Dfilter="io.jenkins.archetypes:"构建mvncleanverifymvncleanpa......
  • dbt plugin 系统简单说明
    dbt实际上提供了一个plugin架构(属于扩展与adapter的plugin机制是不一样的)只是目前官方缺少文档的说明以下是一些简单说明内部处理插件接口定义目前相对简单,只提供了核心是3个方法initialize,get_nodes,get_manifest_artifactsclassdbtPlugin:"""......
  • jmeter插件管理器安装-Plugins Manager
    有些函数是jmeter自带函数,有些函数是自定义的需要通过插件安装的,例如jmeter没有自带base64加密函数,若要使用该函数,可以通过插件安装自定义函数1.下载jmeter插件管理器:https://jmeter-plugins.org/wiki/PluginsManager/ 2.重启在jmeter,在“选项”下显示插件管理器"Plugins......
  • unplugin-auto-import 工程项目 import 模块自动导入
    渡一(袁老师)视频详解[点击前往]unplugin-auto-import是一个用于**Vue3**(和Vue2的CompositionAPI)的插件,它可以自动导入你在代码中使用的VueCompositionAPI函数(如ref,reactive,computed等)以及来自其他库的函数(如VueRouter的useRoute,useRouter,或者Pinia的de......
  • 报错“ opensslErrorStack: [ 'error:03000086:digital envelope routines::initiali
    报错“ opensslErrorStack:['error:03000086:digitalenveloperoutines::initializationerror']”报错信息前端启动项目报错,报错信息如下:$yarnstartyarnrunv1.22.21$cross-envUMI_ENV=devumidevBrowserslist:caniuse-liteisoutdated.Pleaserun:npx......
  • WPF ValidatesOnDataErrors IDataErrorInfo ValidationRule
    //xaml<Windowx:Class="WpfApp91.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mic......
  • dbt 自定义AdapterPlugin 中dependencies 简单说明
    结合dbt-redshift的对于dependencies部分的定义以及使用简单说明下参考代码Plugin:AdapterPlugin=AdapterPlugin(adapter=RedshiftAdapter,#type:ignorecredentials=RedshiftCredentials,include_path=redshift.PACKAGE_PATH,dep......
  • SHA256算法
    SHA256(SecureHashAlgorithm256-bit)是一种安全哈希算法,属于SHA-2系列,由美国国家安全局(NSA)设计并由美国国家标准与技术研究院(NIST)发布。SHA256算法的主要目的是将任意长度的消息映射为一个固定长度(256位,即32字节)的哈希值,这个过程是单向的,意味着从哈希值不能直接还原出原始消息内......
  • IDEA Plugins:Show Comment(快捷显示注释)安装及使用
    感谢友情分享此插件的同学--夏生简介ShowdoccommentattheProjectviewTree,lineEnd,json,other在文件树、行末、JSON等地方显示注释.说明强制依赖被引用字段、方法等的注释,若是被引用的对象没有注释,则不会显示效果下载安装插件:Ctrl+Alt+S搜索Plugins,Then搜索......