摘要:
# -*- coding: utf-8 -*-import sysimport MySQLdbtry: conn=MySQLdb.connect(host="localhost",user="root",passwd="xxx")except Exception,e: print e sys.exit()#获取操作游标cursor=conn.cursor()#执行SQL,创建一个数据库. cursor.execute("""create database if not exists zhsen DEFAU 阅读全文