Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Nice one | 11 comments | Create New Account
Click here to return to the 'Nice one' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Nice one
Authored by: atl on Apr 12, '01 06:54:16AM
I had come to the same conclusion last night, except that I had nothing REQUIREd and had "Late" for my OrderPreference. Is it indeed the Resolver that MySQL requires? Also, since there are so many different MySQL instructions floating around, people trying this at home might want to verify the path to the mysql.server script. It's conceivable that you'll need to replace the path with:
/usr/local/share/mysql/mysql.server start
for example.

[ Reply to This | # ]
Nice one (thanks:)
Authored by: Gwyrrdin on Apr 12, '01 06:08:26PM
well....I'm not to sure about the .plist "requires" issue. But I do know it works fine on three different OS X boxes which I work on.

For the correct path to mysql.server start, you can perform a:

% locate mysql.server


presuming you have once already ran:

 %   ./usr/libexec/locate.updatedb 

(as root)


Important! do NOT use safe_mysqld in the SQL startup shell script. This will cause your OS X box to hang at boot time.
I had to boot in single user mode to disable the startup script before I could boot my OS X box again. So it's very very important that you call the mysql.server script and not the safe_mysqld script.

Cheers

Gwyrrdin


[ Reply to This | # ]
Nice one (welcome:)
Authored by: atl on Apr 13, '01 02:22:11PM
I noticed that safe_mysqld caused a hang, too. I *suspect* (though I haven't tried it), that following it with an ampersand (e.g. safe_mysqld &) would make things happier. You can also make things safer by not running the mysqld as root. One way to do it is:
sudo -u mysql /usr/local/share/mysql/mysql.server start
...but it seems like a nasty way to do it. There is reference in the docs to changing the user by using /etc/my.cnf, but my initial experiments haven't yielded anything there.

[ Reply to This | # ]
safe_mysqld &
Authored by: ascorbic on Apr 13, '01 05:58:22PM

Actually, you SHOULD use safe_mysqld, because it runs in the background, and will restart mysqld if it stops for any reason. Others have noted correctly that an & after a shell command will make it run in the background. This is how my script looks:

#!/bin/sh

. /etc/rc.common

##
# Start up mysql server
##

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



[ Reply to This | # ]
safe_mysqld &
Authored by: Gwyrrdin on Apr 14, '01 03:27:39AM

Hello

Read mysql.server with pico and you'll find out that this script actually launches safe_mysqld.

Only in such a way that system boots up without any problems...
So I would recommend to use mysql.server start

regards

Gwyrrdin



[ Reply to This | # ]
safe_mysqld &
Authored by: ascorbic on Apr 14, '01 06:44:14AM

i stand corrected!



[ Reply to This | # ]
also
Authored by: sawks on Apr 14, '01 01:28:32PM

with the mysql installer i used, mysql.server needed to be chmod 755'd - this may be the case for others as well...

thanks for the startup script :)



[ Reply to This | # ]