I recently installed a copy of the MySQL database server on my Leopard machine. The MySQL site offers a packaged version of MySQL 5.0.x for OS X 10.4 on their downloads page (current as of this posting: 5.0.51).
This 10.4 version works perfectly well with 10.5, except for some minor inconveniences. The first is that they include a preference pane for System Preferences, which doesn't work. They also offer to install a StartupItem to start the database server during boot. This works pretty well, except that Apple has marked StartupItems as depreciated since 10.4, noting that you should use launchd instead. There are many hints out there to create a launchd job using the MySQL supplied launchd_safe, which is basically a shell script for starting, monitoring, and restarting mysqld. That's a pretty ugly solution to start a server with launchd, and is actually discouraged by Apple.
So this hint is about replacing the StartupItem and the mysqld_safe script with a simple launchd job. It assumes you are familiar with the Terminal, logged with an administrator account, and have basic knowledge of launchctl and launchd.plist files. Also being familiar with MySQL configuration might help.
Here's how to set it up:
$ cd /Library/LaunchDaemons
$ sudo chown root com.mysql.mysqld
$ sudo chgrp wheel com.mysql.mysqld
$ sudo chmod 644 com.mysql.mysqld<string>--datadir=/Library/mySQL/data</string>
<string>--pid-file=/Library/mySQL/data/iMac.local.pid</string>
You could also add something like the following to get specific log and error information (if you don't add these, they won't be lost; they end up in the general log in Console.app):
<key>StandardErrorPath</key>
<string>/var/log/mysqlerr.log</string>
<key>StandardOutPath</key>
<string>/var/log/mysqlout.log</string>
The provided launchd example also implements an always-running daemon (via RunAtLoad and KeepAlive), which starts at boot and never quits (and if it does, launchd restarts it). It should be possible to implement an "on demand server" by implementing a Sockets section in the plist file, but I haven't tried this (read man launchd.plist for details, or have a look the various plist files in /System/Library/LaunchDaemons).
Mac OS X Hints
http://hints.macworld.com/article.php?story=20080128103022907