标签:hide hid val 安装 src closed min cursor fetch
1,安装手插件pymysql
2,连接代码如下
import pymysql conn = pymysql.connect(host="localhost", port=3306, user="admin", passwd="password1", db="avi_iot", charset="utf8") cur = conn.cursor() sql = "select id,v_mail from a_mail" cur.execute(sql) results = cur.fetchall() for value1 in results: print(value1[0].center(10), value1[1].replace(‘@avertronics.com‘, ‘‘).split(",")) conn.close()
标签:hide hid val 安装 src closed min cursor fetch
原文地址:https://www.cnblogs.com/lilinan/p/9429683.html