import pymysql db = pymysql.connect(host=',db='jodb1',port=3307,charset='utf8') # #测试连接开发库成功 # db = pymysql.connect(host='172.31.20.2',user='root',passwd='sjroot',port=3306,charset='utf8') # print('heh') #数据中创建表 cursor = db.cursor() cursor.execute('d