Upgrading MySQLdb on Ubuntu/Debian

Like I wrote about last week the stable version of MySQLdb leaks memory and it will crash your long running processes.

These leaks are fixed in the upcoming version - which is 1.2.3c1 currently.

Upgrading is not that simple (or at least, not if you don't have the right packages installed), so here is what you need to do in Ubuntu/Debian to upgrade:

sudo apt-get install build-essential
sudo apt-get install python-dev
sudo apt-get install libmysqlclient15-dev
sudo apt-get install python-setuptools
sudo easy_install MySQL-python
7. Apr 2009 Code · Python · Tips
© Amir Salihefendic