python操作mysql数据库
python操作mysql数据库
import pymysql
#db = MySQLdb.connect("127.0.0.1","root","123456","test" )
dbpymysql.connect(host='127.0.0.1',user='root',password='123456',port= 3306)
curror = db.cursor()#使用cursor()方法获取操作游标
curror.execute('SELECT VERSION()')# 使用execute方
原创
2021-04-06 21:54:09 ·
88 阅读 ·
0 评论