1.wget http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz
tar -xzvf MySQL-python-1.2.3.tar.gz
2.wget http://peak.telecommunity.com/dist/ez_setup.py
3.python ez_setup.py
>>> import setuptools
>>>
4. cd MySQL-python-1.2.3
python setup.py build
python setup.py install
5. >>> import MySQLdb
The first time I did this I got the following error message, but after I’d logged out and logged back in again the error message went away and I couldn’t reproduce it.
/usr/local/python27/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-linux-x86_64.egg/_mysql.py:3: UserWarning: Module _mysql was already imported from /usr/local/python27/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-linux-x86_64.egg/_mysql.pyc, but /home/djn/dev/python/MySQL-python-1.2.3 is being added to sys.path
6. >>> db = MySQLdb.connect(user='sigma', passwd='wonderfull', host='127.0.0.1', db='giga')