摘要:
mysql官网关于python的API是最经典的学习材料,相信对于所有函数浏览一遍以后,Mysql数据库用起来一定得心应手。首先看一下Connector/Python API包含哪些类和模块。Module mysql.connector Class connection.MySQLConnectio... 阅读全文
posted @ 2013-08-08 21:11
bigbigtree
阅读(7506)
评论(0)
推荐(0)
摘要:
首先对于数据库的基本操作要有一定基础,其次了解Python的基础语法。建议先阅读MysqL中文教程http://doc.mysql.cn/mysql5/refman-5.1-zh.html-chapter/和Python基础教程。一、python连接Mysql连接MySQL的方法有多种,如MySQLdb http://sourceforge.net/projects/mysql-python/但是该项目并不支持python3。现在Mysql官方已经提供了python的连接接口Connector/Python,有安装方法和文档。Connector/Python安装地址:http://dev.my 阅读全文
posted @ 2013-08-08 20:59
bigbigtree
阅读(1747)
评论(0)
推荐(0)
摘要:
连接mysql数据库:cnx = mysql.connector.connect(user='joe', database='test') Connector/Python参数列表Argument NameDefaultDescriptionuser(username*)The user name used to authenticate with the MySQL server.password(passwd*)The password to authenticate the user with the MySQL server.database(db*)T 阅读全文
posted @ 2013-08-08 11:05
bigbigtree
阅读(565)
评论(0)
推荐(0)

浙公网安备 33010602011771号