码迷,mamicode.com
首页 > 数据库 > 详细

Python Mysql

时间:2014-05-10 06:03:19      阅读:309      评论:0      收藏:0      [点我收藏+]

标签:c   数据   使用   a   os   sql   

import MySQLdb

# 打开数据库连接
db = MySQLdb.connect("localhost","testuser","test123","TESTDB" )

# 使用cursor()方法获取操作游标 
cursor = db.cursor() #cursor用来执行命令的方法:

Python Mysql,布布扣,bubuko.com

Python Mysql

标签:c   数据   使用   a   os   sql   

原文地址:http://www.cnblogs.com/chengxuyuandashu/p/3719433.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!