The following tutorial explains how to get mySQL (via safe_mysqld) started at system boot. "It took some time, but it's working now."
Read the rest of this article if you'd like your mySQL server to launch when you start your machine.
[Editor's note: I haven't installed this yet myself, but I will, and I'll comment back if I have any problems]
Instructions
NOTE: The '%' is the prompt character; do not include it as part of the command!
You'll need to be doing all of this as root, so use your favorite method of becoming root...
First, create the startup directory and files:
% cd /Library/StartupItemsand enter the following:
% mkdir SQL
% cd SQL
% touch SQL
% touch StartupParameters.plist
% pico SQL
#!/bin/shSave the file and quit Pico. Now we'll edit the StartupParamters.plist:
. /etc/rc.common
##
# Start up SQL server
##
if [ "${SQLSERVER:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting SQL Server"
/usr/local/mysql/share/mysql/mysql.server start
fi
% pico StartupParameters.plistEnter the following text:
{
Description = "secure SQL server";
Provides = ("SQL");
Requires = ("Resolver");
OrderPreference = "None";
Messages =
{
start = "Starting SQL server";
stop = "Stopping SQL server";
};
}Save the file and quit Pico. Now we'll set the correct permissions.% chgrp wheel SQLThe last step is to edit the host config file:
% chgrp wheel StartupParameters.plist
% chmod 755 SQL
% pico /etc/hostconfigand enter the following line:
SQLSERVER=-YES-i've put it between WEBSERVER and APPLETALK_HOSTNAME. Save your changes, quit Pico, exit the terminal, and reboot. After reboot, view processviewer or top in terminal and you should see mysqld and sh (for safe_mysqld) running!
Mac OS X Hints
http://hints.macworld.com/article.php?story=20010411170957604