MySQL & StartupItems Problem

turbine

Emperor of things small
I've got a problem, i've seen people address it here before, but for some reason there's no fix for me.

I've installed MySQL fine. i can start it up manually without any problem. My problem is with automating the startup with a script.

I'm running 10.1.5, and there is no /Library/StartupItems, which i've seen most people say to put the MySQL folder with the MySQL script and StartupParameters.plist file in. So i've put it in /System/Library/StartupItems. When my system boots, I think i see it say it's starting MySQL (it flashes by pretty quick), but then i go to the process viewer, and there is no MySQL running. Anyone got any ideas?

Here are my scripts just for good measure:

MySQL:
#!/bin/sh

. /etc/rc.common

if [ "{MYSQL:=-NO-}" = "-YES-"]; then
ConsoleMessage "Starting MySQL"
cd /usr/local/mysql; ./bin/safe_mysqld &
fi

StartupParameters.plist:
{
Description = "MySQL database server";
Provides = ("MySQL");
Requires = ("Resolver");
OrderPreference = "None";
Messages =
{
start = "Starting MySQL...";
stop = "Stopping MySQL...";

};
}


i've also updated the /etc/hostconfig to have the line MYSQL=-YES-

HELP!!
 
Originally posted by turbine
I've got a problem, i've seen people address it here before, but for some reason there's no fix for me.

I've installed MySQL fine. i can start it up manually without any problem. My problem is with automating the startup with a script.

I'm running 10.1.5, and there is no /Library/StartupItems, which i've seen most people say to put the MySQL folder with the MySQL script and StartupParameters.plist file in. So i've put it in /System/Library/StartupItems. When my system boots, I think i see it say it's starting MySQL (it flashes by pretty quick), but then i go to the process viewer, and there is no MySQL running. Anyone got any ideas?
.
.
.


/System/Library/StartupItems is reserved for use by the OS, and as such you do not want to put user made StartupItems in there. If there is no /Library/StartupItems as you say - in my case too there was originally none - then you just create one.

Devshed's has a good page regarding the above:

http://www.devshed.com/Server_Side/Administration/BuildingOnOSX/page3.html
 
Yeah, i figured that out about a few hours after i posted. that link that you posted looks like a great site! it's got all kinds of goodies there.
 
Back
Top