pip install mysqlclient
pip install pymysql
pymysql.install_as_MySQLdb(
import MySQLdb con = MySQLdb.connect('ip地址', '用户名', '密码', '数据库名') #不报错就成功了