ImportError: No module named MySQLdb

Gabriel Genellina gagsl-py2 at
Tue Apr 8 06:53:44 CEST 2008

En Tue, 08 Apr 2008 00:35:29 -0300, syed mehdi <smmehadi at>  

> I have been working in python from some time now,
> while writing a python script i used: import MySQLdb in my script to do  
> some
> database related operations.
> When i tried to execute the same script on another system it gave me an
> error as:
> "ImportError: No module named MySQLdb"
> though mysqldb was already installed on that system, and python 2.5.2 was
> present on that machine.
> i have tried uninstalling and installing of mysql again and again but to  
> no
> avail.

MySQL (the database engine) is not the same as MySQLdb (the Python  
package). You have to download and install it:

Gabriel Genellina

More information about the Python-list mailing list