3
# /Library/StartupItems/MySQLCOM/MySQLCOM
5
# A script to automatically start up MySQL on system bootup
6
# for Mac OS X. This is actually just a wrapper script around
7
# the standard mysql.server init script, which is included in
8
# the binary distribution.
11
# Written by Lenz Grimmer <lenz@mysql.com>
14
# Suppress the annoying "$1: unbound variable" error when no option
17
echo "Usage: $0 [start|stop|restart] "
21
# Source the common setup functions for startup scripts
22
test -r /etc/rc.common || exit 1
25
# The path to the mysql.server init script. The official MySQL
26
# Mac OS X packages are being installed into /usr/local/mysql.
27
SCRIPT="/usr/local/mysql/support-files/mysql.server"
31
if [ "${MYSQLCOM:=-NO-}" = "-YES-" ] ; then
32
ConsoleMessage "Starting MySQL database server"
33
$SCRIPT start > /dev/null 2>&1
39
ConsoleMessage "Stopping MySQL database server"
40
$SCRIPT stop > /dev/null 2>&1
45
ConsoleMessage "Restarting MySQL database server"
46
$SCRIPT restart > /dev/null 2>&1
49
if test -x $SCRIPT ; then
52
ConsoleMessage "Could not find MySQL startup script!"