Python连接mysql数据库 import pymysql # 打开数据库连接 db=pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='root',db='test', char