mysql-connector-python
wget http://cdn.mysql.com//Downloads/Connector-Python/mysql-connector-python-2.1.3.tar.gz tar mysql-connector-python-2.1.3.tar.gz cd ysql-connector-python-2.1.3 python setup.py install [root@localhost mysql-connector-python-2.1.3]# pip list
mysql-connector-python (2.1.3)
MySQL-python (1.2.3)
mysql-utilities (1.5.6)
pip (8.1.2)
queuelib (1.4.2)
setuptools (23.1.0)
>>>import mysql.connector
>>>conn = mysql.connector.connect(user='root', password='', database='test', use_unicode=True)
>>>cursor = conn.cursor()
>>>cursor.execute('create table user (id varchar(20) primary key, name varchar(20))')
>>>cursor.execute('insert into user (id, name) values (%s, %s)', ['', 'Michael'])
>>>cursor.rowcount
>>>conn.commit()
>>>cursor.close()
mysql-connector-python的更多相关文章
- Snippet: Fetching results after calling stored procedures using MySQL Connector/Python
		
https://geert.vanderkelen.org/2014/results-after-procedure-call/ Problem Using MySQL Connector/Pytho ...
 - Installing MySQL Connector/Python using pip v1.5
		
The latest pip versions will fail on you when the packages it needs to install are not hosted on PyP ...
 - MySQL Connector/Python 接口 (一)
		
这里仅介绍 MySQL 官方开发的 Python 接口,参见这里: https://dev.mysql.com/doc/connector-python/en/ Chapter 1 Introduct ...
 - MySQL Connector/Python 安装、测试
		
安装Connector/Python: # wget http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-pyth ...
 - MySQL Connector/Python 接口 (二)
		
连接数据库 本文参见这里,示例如何连接MySQL 数据库. import mysql.connector from mysql.connector import errorcode # 连接数据库需要 ...
 - MySQL Connector/Python 接口 (三)
		
本文参见这里. 使用缓冲的 cursor,下例给从2000年加入公司并且还在公司的员工薪水从明天起加15% from __future__ import print_function from dec ...
 - python使用mysql的三个模块:mysql.connector、sqlalchemy、MySQLdb
		
在python中使用mysql其实很简单,只要先安装对应的模块即可,那么对应的模块都有什么?官方也没指定也没提供,pcat就推荐自己遇到的3个模块:mysql.connector.sqlalchemy ...
 - MySQL:Download Connector/Python
		
MySQL Connector / Python是用于Python平台和开发的标准化数据库驱动程序. 此外,MySQL Connector / Python 8.0支持使用MySQL Server 8 ...
 - mysql.connector操作mysql的blob值
		
This tutorial shows you how to work with MySQL BLOB data in Python, with examples of updating and re ...
 - How to Access MySQL with Python Version 3.4
		
http://askubuntu.com/questions/630728/how-to-access-mysql-with-python-version-3-4 How to Access MySQ ...
 
随机推荐
- 【MySql存储过程】DATE_ADD用法
			
定义和用法 DATE_ADD() 函数向日期添加指定的时间间隔. 语法 DATE_ADD(date,INTERVAL expr type) date 参数是合法的日期表达式.expr 参数是您希望添加 ...
 - volatile之一--volatile不能保证原子性
			
Java语言是支持多线程的,为了解决线程并发的问题,在语言内部引入了 同步块 和 volatile 关键字机制在java线程并发处理中,有一个关键字volatile的使用目前存在很大的混淆,以为使用这 ...
 - (转载)linux环境变量
			
转自:http://www.cnblogs.com/growup/archive/2011/07/02/2096142.html Linux 的变量可分为两类:环境变量和本地变量 环境变量,或者称为全 ...
 - 解决session失效之后登陆后重新返回之前的页面
			
在全局拦截器设置保存之前的url存入session中 登陆之后的地址再重session中存 request只用作一次请求 如果页面跳转几次的话原来的url就不存在了建议存在session @Overr ...
 - 关于使用digitalocean的vps
			
先说说测试速度 平均在延迟125ms,机房选择新加坡 还有其他机房,比如伦敦,西海岸,阿姆斯特丹,基本全球覆盖. 以前用linode,virpus. linode以前有$5的套餐,现在最低都在10刀了 ...
 - android-serialport-api  and libusb for android
			
libusb for android: Even if you get it compiled, Android is probably not going to let you access the ...
 - hdu4435-charge-station(搜索+贪心)
			
题意&题解: http://www.cnblogs.com/wuminye/p/3245546.html 说实话看了题解觉得很简单,但是比赛的时候真的是毫无头绪. 然而印象中做过一道类似的二进 ...
 - UITableView 详解 教程
			
看TableView的资料其实已经蛮久了,一直想写点儿东西,却总是因为各种原因拖延,今天晚上有时间静下心来记录一些最近学习的TableView的知识.下面进入正题,UITableView堪称UIKit ...
 - jquery.layout框架分割线
			
css <link href="${base}/res/common/css/jquery.layout/jquery.layout.css" rel="style ...
 - Microsoft .NET Pet Shop 4
			
Microsoft .NET Pet Shop 4:将 ASP.NET 1.1 应用程序迁移到 2.0 299(共 313)对本文的评价是有帮助 - 评价此主题 发布日期 : 2006-5-9 | 更 ...