Download from sourceforge and extract.
$ python setup.py clean $ python setup.py build $ sudo python setup.py install
mysql_config.path = "mysql_config"
to
mysql_config.path = "/usr/local/mysql/bin/mysql_config"
Note: you have to specify the path to your mysql_config unless you have installed mysql.com package for Mac.
/usr/include/sys/types.h:92: error: duplicate ‘unsigned’ /usr/include/sys/types.h:92: error: two or more data types in declaration specifiers
edit the _mysql.c file and comment out this line
#define uint unsigned int
Make sure if you python is 32 bit, that your MySQL is 32 bit also.
If you are installing MySQLdb in a virtualenv instance, it may be compiling against the system python, which may be 64-bit. Read up on Installing Python Packages.
brainfault.com, etc