python2 mysql_Python2.7简单连接与操作MySQL的方法
# -*- coding: utf8 -*-import MySQLdbconn=MySQLdb.connect(host='localhost',user='root',passwd='1',db='test')cursor = conn.cursor()cursor.execute ("SELECT VERSION()")row = cursor.fetchone ()print "serve...