时间:2021-07-01 10:21:17 帮助过:19人阅读
db = pymysql.connect("192.168.3.5","root","passwd","dbname")
cursor = db.cursor()
sql = "select version()"
try:
cursor.execute(sql)
db.commit()
except Exception as e:
db.rollback()
db.close()
python操作mysql数据库
标签:数据 mysql数据库 操作 exe mysql sele l数据库 pass pytho