乐知付加密服务平台

如果你有资源, 平台可以帮你实现内容变现, 无需搭建知识付费服务平台。

点击访问官方网站 https://lezhifu.cc

扫码关注公众号 乐知付加密服务平台-微信公众号
python使用MysqlDB连接mysql问题 | chenzuoli's blog

python使用MysqlDB连接mysql问题

安装mysqldb包,首先需要安装一下mysql-devel,问题报错如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[root@syncdb01 ~]# yum install -y mysql-devel
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
mysql-connectors-community | 2.6 kB 00:00:00
mysql-tools-community | 2.6 kB 00:00:00
mysql57-community-dmr | 2.6 kB 00:00:00
updates | 2.9 kB 00:00:00
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-devel.x86_64 0:5.7.40-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================
Installing:
mysql-community-devel x86_64 5.7.40-1.el7 mysql57-community-dmr 4.2 M

Transaction Summary
===========================================================================================================================================================
Install 1 Package

Total size: 4.2 M
Installed size: 24 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/mysql57-community-dmr/packages/mysql-community-devel-5.7.40-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Retrieving key from file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql


The GPG keys listed for the "MySQL 5.7 Community Server Development Milestone Release" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.


Failing package is: mysql-community-devel-5.7.40-1.el7.x86_64
GPG Keys are configured as: file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

解决办法:

1
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022

没事记录一下。

-------------本文结束感谢您的阅读-------------