centOS下安装python MySQLdb

LucyGill 2015-02-24

centOS下安装python MySQLdb的惨痛教训

cnetOS下为python安装MySQLdb模块,以便使用python连接MySQL。

安装MySQL前需python-devel、mysql-devel、zlib-devel、openssl-devel的支持,

centOS 下 键入yum python-devel mysql-devel zlib-devel openssl-devel,进行安装

使用wget下载MySQL-python-1.2.4b4.tar.gz

(放到个人服务器上了,www.lizhiwen.xyz/files/MySQL-python-1.2.4b4.tar.gz)

解压 tar zxvf  MySQL-python-1.2.4b4.tar.gz

进入目录 cd MySQL-python-1.2.4b4

安装 

python setup.py build

python setup.py install

相关推荐