#第一句话写成#!/usr/local/python不行,还不知道为啥
#!/usr/bin/env python
import MySQLdbdb = MySQLdb.connect("192.168.74.130","root","l","")
cursor=db.cursor()
cursor.execute("select version()")
data=cursor.fetchone()
print "Database version : %s " % data
db.close()