python 使用mysql示例
时间:2021-07-01 10:21:17
帮助过:25人阅读
mysql.connector
conn = mysql.connector.connect(user=
‘root‘,password=
‘123456‘,database=
‘javaweb‘)
cursor =
conn.cursor()
cursor.execute("select * from commodity")
values =
cursor.fetchall()
for value
in values:
print(value)
cursor.close()
conn.close()
python 使用mysql示例
标签:print external nec password 示例 data gpo javaweb nal