This assumes a running MySQL Server on the system. For installing MySQL you can use FINK.
1. Create a new dir in /Library/StartupItems
sudo mkdir /Library/StartupItems/Mysql
and place the following two files in it:
2. File 1: MySQL
#!/bin/sh
##
# Start MySQL Server
##
. /etc/rc.common
ConsoleMessage "Starting MySQL Server"
/sw/bin/safe_mysqld &
3. File 2: StartupParameters.plist
{
Description = "MySQL Initialization";
Provides = ("MySQL");
Requires = ("Network", "Disks", "Resolver");
Uses = ("NFS");
OrderPreference = "Last";
Messages =
{
start = "Starting MySQL";
stop = "Stopping MySQL";
};
}
4. Chmod the first file:
chmod 700 MySQL
These settings are taken form the OpenBase-Server startup-settings, so feel free to compare.
1 Gedanke zu „Starting MySQL at boottime“
Kommentare sind geschlossen.