#!/usr/bin/python
# -*- coding:utf-8 -*-import MySQLdb
db = MySQLdb.connect("127.0.0.1", "root", "123", "openDB")
cursor = db.cursor()cursor.execute("SELECT VERSION()")data = cursor.fetchone()print data
sql = "insert into sold_1 values(111999030048,now())"
cursor.execute(sql)db.commit()db.close()