I had no luck compiling from source on a fresh Leopard install and mysql5-devel on macports doesn't compile yet.(didn't spend anytime looking into why), so I grabbed the tarred pre-compiled version of mysql (mysql-5.1.22-rc-osx10.4-i686) which works fine after some permissions setup.
I had issues compiling mysql gem though because of the bug documented at (http://bugs.mysql.com/bug.php?id=28544) and the fact that using -arch ppc in the Make file of the gem causes errors about missing symbols for the PPC architecture. Below are the steps to get through this in case someone faces the same issues:
1 - Go to the gem source and edit the Makefile removing all references to -arch ppc (that would render the output intel only). I don't have a PPC mac to test if the issue is there too.
2 - sudo make
3 - The bundle created, if installed as is, would try to load libmysqlclient.16.dylib from /usr/local/mysql/lib/ which, in my case at least was not where I untarrd the pre-compiled version so this needs changing using install_name_tool
4 - issue the following command to change the Library path on the generated mysql.bundle:
sudo install_name_tool -change /usr/local/mysql/lib/libmysqlclient.16.dylib /opt/mysql/lib/libmysqlclient.16.dylib mysql.bundle
as you can see I installed the pre-compiled mysql in /opt/mysql hence the location used in the above install_name_tool argument.
5 - issue 'otool -L mysql.bundle' to make sure its referencing the right location for libmysqlclient.16.dylib.
6 - If all is well so far, issue 'sudo make install'
I hope someone finds this useful, or better mysql gets up to speed on Leopard through mac ports :-).