Problems installing MySQLdb? Me too! I'm installing using MySQL 5 / Django 1.1 / Python 2.4 on CentOS 5.4 linux. First, make sure all of the dependencies are installed and up-to-date
yum install python-devel
yum install mysql-devel
yum install zlib-devel
yum install openssl-devel
yum install gcc
Then, download MySQLdb. Be careful here, when you do a search on Google or are pointed to the site it's usually sending people to the Zope installer. The actual files you're looking for can be downloaded from the link below, in the mysql-python folder, I'm using version 1.2.2.
http://sourceforge.net/projects/mysql-python/files/
tar -xzvf MySQL-python-1.2.2.tar.gz
cd MySQL-python-1.2.2
python setup.py build
python setup.py install
To test:
python
>>> import MySQLdb
Comment or email if you found this useful.
Share on Twitter
Share on Facebook