mysql python 1.2.4b4_python操作MySQL

Description

MySQLdb is a Python DB API-2.0-compliant interface; see PEP-249 for details. For up-to-date versions of MySQLdb, use the homepage link.

Supported versions:

* MySQL versions from 3.23 to 5.5; 5.0 or newer recommended. MariaDB should also work.

* Python versions 2.4-2.7; Python 3 support coming soon.

ZMySQLDA is a Database Adapter for Zope2.

注意、MySQL数据库要用MySQLdb模块,但Python用来链接MySQL的第三方库MySQLdb不支持Python3.x

安装MySQLdb

下载   MySQL-python-1.2.4b4.tar.gz[root@localhost IdcCheck]# wget http://downloads.sourceforge.net/project/mysql-python/mysql-python-test/1.2.4b4/MySQL-python-1.2.4b4.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fmysql-python%2F&ts=1478767096&use_mirror=jaist .

[root@localhost IdcCheck]# tar -zxvf MySQL-python-1.2.4b4.tar.gz

解压缩[root@localhost IdcCheck]# tar -zxvf MySQL-python-1.2.4b4.tar.gz

执行

[root@localhost IdcCheck]# cd MySQL-python-1.2.4b4

编译

[root@localhost MySQL-python-1.2.4b4]# python setup.py  build

安装[root@localhost MySQL-python-1.2.4b4]# python setup.py  install

测试是否安装成功,执行如下代码不报错,则代表成功

[root@localhost IdcCheck]# python

Python 2.6.6 (r266:84292, Sep 12 2011, 14:03:14)

[GCC 4.4.5 20110214 (Red Hat 4.4.5-6)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值