Hi
Dafür gibt es eine Lösung:
im Verzeichnis /Library/Startupitems einen Ordner MySQL amlegen
In diesem Ordner die Datei MySQl anlegen.
Inhalt:
#!/bin/sh
. /etc/rc.common
##
# Start up the MySQL database server on Mac OS X / Darwin
#
#
# History
# -------
#
# 2001-04-02 Marc Liyanage <liyanage@access.ch>
# First version
#
# 2001-12-02 Marc Liyanage <liyanage@access.ch>
# Added localized startup messages in 7 languages
# by adapting the resources of the Apple-supplied
# "Sendmail" startup script.
#
#
# License
# -------
#
# The MySQL license applies to this file
#
if [ "${MYSQL:=-YES-}" = "-YES-" ]; then
ConsoleMessage "Starting MySQL database server"
# Some mysql scripts will not work in the /usr/local/mysql
# symlinked directory, only in the real one with the
# version number.
#
# To prevent having to change this script every time the
# version changes, we use perl to read out the actual symlink
# value of /usr/local/mysql and cd to that directory.
# Everything will work from there.
#
cd /usr/local/
REALDIR=`perl -e 'print readlink "mysql"'`
cd $REALDIR
# We have to find out if we're starting a 3.x or a 4.x
# MySQL database server
#
if [ -e ./bin/safe_mysqld ]
then
# This is version 3.x
#
./bin/safe_mysqld --user=mysql &
elif [ -e ./bin/mysqld_safe ]
then
# This is version 4.x
#
./bin/mysqld_safe --user=mysql &
else
# Don't know what version this is
#
ConsoleMessage "Found neither safe_mysqld nor mysqld_safe"
fi
fi
Die Datei StartupParameters.plist anlegen
Inhalt:
{
Description = "MySQL database server";
Provides = ("MySQL");
Requires = ("Resolver");
Preference = "Late";
Messages =
{
start = "Starting MySQL";
stop = "Stopping MySQL";
};
}
Die Dateien müssen ausführbar sein.
Oder nutze diesen Installer:
http://www2.entropy.ch/download/mysql-startupitem.pkg.tar.gz
HTH
W