Python操作MySQL基础使用 链接数据库并查询数据 import pymysql # 链接数据库 conn = pymysql.connect( host='10.5.6.250', port=3306, user='root', password=