python 连接mysql报错:mysql.connector.errors.NotSupportedError: Authentication plugin ‘caching_sha2_passw
python 连接mysql报错:mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not support
前提:使用mysql.connector.connect() 连接mysql数据:
原因: 如果你的 MySQL 是 8.0 版本,密码插件验证方式发生了变化,早期版本为 mysql_native_password,8.0 版本为 caching_sha2_password,所以需要做些改变:
1. 先修改 my.ini 配置:
[mysqld]
default_authentication_plugin=mysql_native_password
重启mysql 服务;
步骤1修改完后如果还不行,执行第2步;
2. 安装:
python -m pip install MySQL-connector-python
步骤1、步骤2 后基本可以使用了,如果还不行,执行步骤3;
3. 按如下代码修改:
myDb = connector.connect(host="localhost",user="root",passwd="******",database="test",auth_plugin='mysql_native_password')
python 连接mysql报错:mysql.connector.errors.NotSupportedError: Authentication plugin ‘caching_sha2_passw相关推荐
- workman使用时,mysql报错 mysql gone away
在使用workman的时候碰到两个问题 1.mysql报错 mysql gone away; 2.redis更新报错: 原因: 查看workman 手册得知,不要在主进程中初始化数据库.memcac ...
- python连接SQL报错:1366, Incorrect string value: '\\xF0\\x9F\\x98\\x81'
问题描述:Python从百度地图抓取消息保存到MySQL数据中,对应数据库字段为varchar以及TEXT,字符编码utf-8.部分插入成功,部分插入失败,报错如下. error:1366, &quo ...
- python连接oracle报错dpi 1047_python连接Oracle的方式以及过程中遇到的问题
一.库连接步骤 1.下载cx_Oracle模块 下载步骤 工具 pycharm :File--->右键setting--->找到Project Interpreter -----> ...
- python连接oracle报错tns_Python3操作oracle数据库及遇到的报错
首先下载及安装cx_Oracle: 下载地址:http://www.lfd.uci.edu/~gohlke/pythonlibs/ 安装:pip3.6 install E:\Python36\Scri ...
- python连接oracle报错DPI-1047
pip install cx_Oracle python连接时报错: 报错信息:cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Or ...
- 命令行连接MySQL报错:mysql: [Warning] Using a password on the command line interface can be insecure
该问题与下面的问题一样: Linux下MySQL命令行不能输入密码
- MySQL 报错MySQL server syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT'
在hive的应用中,出现如下错误时You have an error in your SQL syntax; check the manual that corresponds to your MyS ...
- python连接oracle报错TNS,python连接oracle数据库报出 ORA-12541: TNS: 无监听程序
答:方法一: 在oracle_home下找到lsnrctl.exe 输入 start 方法二 可能认不到实例名 在cmd下运行 set oracle_sid=自己数据库的实例名(大多数orcl) 网上 ...
- 【MySQL】MySQL 8 IDEA连接本地MySQL报错 Host DESKTOP-MISSMJIJ is not allowed to connect to this serv
1.背景 在window10 下开发,MySQL 8 IDEA连接本地MySQL报错 MySQL 8 Host DESKTOP-MISSMJIJ is not allowed to connect t ...
最新文章
- Google揭露美国政府通过NSL索要用户资料
- android 自定义listpreference,java-Android,单击ListPreference项时显示对话框
- 关于NullPointerException
- 鸿蒙系统出来没有,呜呼哀哉!历尽艰辛研发出鸿蒙系统,却无厂商敢用
- PHP金额计算高精度函数
- python函数的传参要求_python中函数传参详解
- JDK中这些常用方法也有Bug
- 微小宝公众号排行榜_排行榜 | 山西省高校、高职中专微信公众号周数据排行榜...
- burpsuite小米手机抓包_使用burpsuite实现Android APP的HTTPS抓包
- GTK实现绘图功能(draw.c)
- u盘无媒体容量0无卷还能修吗_都2020年了,买新U盘没Type-C接口就过时了
- struts2(一) struts2入门
- Chapter 5. MPEG-4 Visual
- 【狂神说Redis】1NoSQL概述1-2什么是NoSQL
- 伺服驱动器cn1引脚定义_关于三菱驱动器CN1端口的接线-专业自动化论坛-中国工控网论坛...
- 接口可维可测;统一管理
- ecc6.0 oracle安装,SAP ECC v6.0 SR3 IDES Oracle 10.2.0.2 安装指南
- Flask+pywebview开发桌面应用实战记录
- Packettracer--计算机网络实验
- Opengl ES之PBO