NYCPHP Meetup

[nycphp-talk] Installing MySQL 4.0 on Mac OS X

Ian Forsyth ian at plusfour.org
Mon Apr 14 18:45:21 EDT 2003


On Monday, April 14, 2003, at 03:30 PM, Chris Shiflett wrote:

> --- Matthew Zimmerman <mz34 at nyu.edu> wrote:
>> I am installing MySQL 4.0 on a Mac OSX 10.2.5 server and was having
>> some trouble. Wondering if anyone else on here had any luck.
>>
>> I follow the instructions to installing using the Mac OSX package and
>> when I issue the command
>>
>> /bin/mysqld_safe &
>>
>> the daemon starts and then stops.
>>

/bin/mysqld_safe --datadir=$datadir --pid-file=$pid_file &

check out 'mysql.server' /usr/local/mysql/support-files/mysql.server

make an entry in /etc/hostconfig

MYSQLSERVER=-YES-

put the following script in /Library/StartupItems/MySQL and name the 
script MySQL

#!/bin/sh

##
# Apache HTTP Server
##

. /etc/rc.common

StartService ()
{
     if [ "${MYSQLSERVER:=-NO-}" = "-YES-" ]; then
	ConsoleMessage "Starting MySQL Database server"
	mysql.server start
     fi
}

StopService ()
{
     ConsoleMessage "Stopping MySQL Database server"
     mysql.server stop
}

RestartService ()
{
     if [ "${MYSQLSERVER:=-NO-}" = "-YES-" ]; then
	ConsoleMessage "Restarting MySQL Database server"
	mysql.server restart
     else
	StopService
     fi
}

RunService "$1"




More information about the talk mailing list