x_boot

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年8月15日

摘要: 用python来创建数据库的源码 1 import MySQLdb 2 3 conn = MySQLdb.connect(host='127.0.0.1', user='root', passwd='12345') 4 cursor=conn.cursor() 5 cursor.execute("""create database if not exists db_pytest""") 6 conn.select_db('db_pytest') 7 cursor.exec 阅读全文
posted @ 2013-08-15 15:53 x_boot 阅读(5335) 评论(0) 推荐(0) 编辑