这还真看不出原因来,上服务器Python3环境导入一下MySQLdb看报错吗
[root@zanhu ~]# python3
Python 3.7.2 (default, Mar 31 2019, 20:52:14)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>>
settings里面数据库连接信息看一下,系统装过 yum install mysql-devel 吧