import pymysql # 导入pymysql库import time# 创建数据库连接,注意密码参数passwd不要写成passwordconn = pymysql.connect(host='127.0.0.1',port=3306,user='root',passwd='root',db='test',charset='utf8')cursor = conn.cursor() # 获取游标对象def GetNow(localTime):"""获取当前时间"""return time.s...