I have the same issue but it's not related to mysql :( I installed postgresql but I have memory leak too.
I use Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) in Debian Linux squeeze. But it seems that with Python 2.7.2+ (default, Oct 4 2011, 20:03:08) (Ubuntu 11.10) everything is good.