|
#1
| |||
| |||
| [REQUEST] - HowTo setup startup services on Jaguar (10.2.3) could someone ceate a [HowTo] on this? thanks for some reason my mysql setup won't work. i've added the MYSQL=-YES- in the /etc/hostconfig and created the folder /Library/StartupItems/MySQL created file MySQL created file StartupParametres.plist but still it dosen't work the problem seems to be, the MYSQL env var is not not being read or its set to -NO- although i explictly set it to -YES- and hence the mysqld is never initialized otherwise everything is fine Last edited by wiz; January 1st, 2003 at 08:50 PM. |
|
#2
| ||||
| ||||
| MySQL from Entropy? Did you install MySQL using the packages available at entropy.ch? These make it a lot easier. So to troubleshoot... - In my (entropy) installed version of MySQL there's also a "Resources" folder containing an "English.lproj" file. I'm not sure if this is necessary. - The MySQL script has to be executable. Is it? - The MySQL script should contain something like this: #!/bin/sh . /etc/rc.common if [ "${MYSQL:=-YES-}" = "-YES-" ]; then ConsoleMessage "Starting MySQL database server" cd /usr/local/ REALDIR=`perl -e 'print readlink "mysql"'` cd $REALDIR ulimit -n 6000 if [ -e ./bin/safe_mysqld ]; then ./bin/safe_mysqld --user=mysql & elif [ -e ./bin/mysqld_safe ]; then ./bin/mysqld_safe --user=mysql & else ConsoleMessage "Found neither safe_mysqld nor mysqld_safe" fi fi - My StartupParameters.plist file has these contents. How does it compare to yours?: { Description = "MySQL database server"; Provides = ("MySQL"); Requires = ("Resolver"); Preference = "Late"; Messages = { start = "Starting MySQL"; stop = "Stopping MySQL"; }; } |
|
#3
| ||||
| ||||
| You also might want to check .... .... if you can start / stop the service manually with the SystemStarter command: SystemStarter start MySQL or SystemStarter stop MySQL If you get any errors with this (which I did), then you'll have to get this to work first. In my case, the script was using the default MySQL environment for startup, whereas the version directly from MySQL has to be configured slightly different. I can post my version of the script here later if you want. C
__________________ ------------------============------------------ (Alu)PowerBook 17", 1.67Ghz, 1.5Gb, 128Mb ATI [clears throat] Ahem - SWEEEEEEEEET ![]() IT'S SPANKING! |
|
#4
| |||
| |||
| well actually i got it working !!! using the Jaguar style startup script!! (/Library/StartupItems/MySQL/MySQL) here my script... Code: #!/bin/sh
##
# MySQL Database Server
##
. /etc/rc.common
StartService ()
{
if [ "${MYSQL:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting MySQL"
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe --user=mysql &
fi
}
StopService ()
{
ConsoleMessage "Stopping MySQL"
/usr/local/mysql/bin/mysqladmin shutdown
}
RestartService ()
{
if [ "${MYSQL:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Restarting MySQL"
StopService
StartService
else
StopService
fi
}
RunService "$1" Code: sudo /Library/StartupItems/MySQL/MySQL start sudo /Library/StartupItems/MySQL/MySQL restart sudo /Library/StartupItems/MySQL/MySQL stop Last edited by wiz; January 3rd, 2003 at 04:11 PM. |
|
#5
| |||
| |||
| but tryin the system starter i get the following error: Unable to load localization strings for i guess thats because i don't have that English.lproj file |
|
#6
| |||
| |||
| here is my StartupParameter.plist contents tooo, Jaguar style... (XML actually) (/Library/StartupItems/MySQL/StartupParameter.plist) Code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Description</key> <string>MySQL Database Server</string> <key>OrderPreference</key> <string>Late</string> <key>Provides</key> <array> <string>MySQL</string> </array> <key>Requires</key> <array> <string>Network</string> </array> </dict> </plist> |
|
#7
| |||
| |||
| so wiz, to get your startup XML script to work, I create a directory inside System/Library/StartupItems called mySQL and put your script in there with the correct path to my mySQL directory? Thanks |
|
#8
| |||
| |||
| ditto but the script might not work with MySQL 3.x to get it working... just replace the Code: StartService ()
{
if [ "${MYSQL:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting MySQL"
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe --user=mysql &
fi
} Code: StartService ()
{
if [ "${MYSQL:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting MySQL"
cd /usr/local/mysql ; /usr/local/mysql/bin/safe_mysqld --user=mysql &
fi
} NOTE: some newer binary releases of 4.x have a link name safe_mysqld that links to mysqld_safe also don't forget to add the MYSQL=-YES- in the /etc/hostconfig replacing it with MYSQL=-NO- will stop initializing the mysql server on startup TIP: backup that hostconfig file, it's safer Last edited by wiz; January 12th, 2003 at 12:50 AM. |
![]() |
| Thread Tools | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SHUTDOWN without warning SCARY!! | astro_sk | Mac OS X System & Mac Software | 10 | May 16th, 2003 02:45 PM |
| Mac G4 won't finish startup after 10.2.3 update | akerychuk | Mac OS X System & Mac Software | 14 | February 19th, 2003 10:37 PM |
| problem with classic startup in jaguar | RyanLang | Mac Classic System & Software | 3 | January 14th, 2003 01:05 PM |
| hack to modify startup sound in jaguar? | dtmdoc | Mac OS X System & Mac Software | 7 | November 29th, 2002 03:06 PM |
| How do I startup and shutdown network services from terminal? | vikingshelmut | Mac OS X System & Mac Software | 7 | June 27th, 2002 01:41 PM |