import pymysql
conn = pymysql.connect(host=‘192.168.70.129‘,port=3306,user=‘root‘,passwd=‘123456‘,db=‘my‘)
cursor = conn.cursor()
cursor.execute("select * from student")
row_1 = cursor.fetchone()
print row_1
cursor.close()
conn.close()
标签:passwd etc log from nbsp user host highlight sel
import pymysql
conn = pymysql.connect(host=‘192.168.70.129‘,port=3306,user=‘root‘,passwd=‘123456‘,db=‘my‘)
cursor = conn.cursor()
cursor.execute("select * from student")
row_1 = cursor.fetchone()
print row_1
cursor.close()
conn.close()
标签:passwd etc log from nbsp user host highlight sel
原文地址:https://www.cnblogs.com/qiangayz/p/8667397.html