封装操作mysql: import pymysql class MyDb: def __init__(self,host,password,user,db,port=3306,charset='utf8',autocommit=True): try: self.coon = pymysql.connect(host=host,password=password, user=user,db=db,port=port, charset=charset,autocommit=autocommit) e…