常见MySQL操作 所需模块: pip3 install pymysql 查询(fetchone,fetchmany,fetchall): import pymysql #连接 con = pymysql.connect(host='localhost',user='root',passwd='admin',db='db1',charset='utf8') # 游标 cur = con.cursor() sql = 'select * from USER ' cur.execute(sql) #…