If you try to build the MySQL Python library on Mac OS X 10.5 (Leopard) you’ll get an error similar to this:
/usr/include/sys/types.h:92: error: duplicate ‘unsigned’
/usr/include/sys/types.h:92: error: two or more data types in declaration specifiers
error: command 'gcc' failed with exit status 1
I found the fix for this error here: http://www.keningle.com/?p=11, via a comment on this site: http://dotnet.org.za/ncode/archive/2007/01/31/setting-up-mysql-for-python-mysqldb-on-mac-os-x-2.aspx. It’s just a couple of lines in Terminal, adding a symlink so the library knows where to look to find the files.
Some background: Unless you’re using SQLite, you need to install a Python library to interface with your chosen database (PostgreSQL, MySQL or Oracle).
The MySQL library can be downloaded here: http://www.djangoproject.com/r/python-mysql/
But it seems there are a few problems running this library on Mac OS X 10.5 (Leopard), hence the above fix.