python之pymysql模块的使用
前言
python通过pymysql模块实现对数据库的更删改查等的操作
使用示例
import pymysql
# 连接ip,数据库用户,数据库密码,数据库,字符集
connect_db = pymysql.connect("192.168.110.225", "root", "1234", "test", charset="utf8")
# 获取游标
cursor = connect_db.cursor()
# 插入数据
# sql = "insert into info (name, cl
原创
2020-06-13 23:44:37 ·
108 阅读 ·
0 评论