I would like to configure MySQL to start and stop automatically when I boot or shutdown my Linux box. I'm running Slackware 7.1 - Any help would be greatly appreciated!
I have never used Slackware but in RedHat, you have to add a couple of scripts in the /etc/rc.d/init.d/rc.x (where x is the runlevel) directory - one to start the process S.... and one to kill the process K....
Look for something similar in Slackware. Mise Le Meas,
Thanks Mighty - I think I'm edditing the right scripts but I think I may be getting the sytanx wrong. It seems to start the script but then hangs up. Could you help me out with a couple examples?
Can you post the scripts that you are using so that I can have a look at them. I can't guarantee that I'll know what the problem is but I might spot something. Mise Le Meas,
Okay, I think I figured it out. I copied the script, "mysql.server" to "rc.mysql" and added the following to my startup and shutdown scripts:
rc.6 added:
# Shutdown MySQL
if [ -x /etc/rc.d/rc.mysql ]; then
echo "Shutting down MySQL...."
. /etc/rc.d/rc.mysql stop
fi
rc.M added:
# Start the MySQL script.
if [ -x /etc/rc.d/rc.mysql ]; then
echo "Trying to start MySQL...."
. /etc/rc.d/rc.mysql start
else
echo "Unable to start MySQL"
fi
This seems to work. However, now I seem to have another problem when MySQL starts up it blurps some message about the command, "@HOSTNAME@" being invalid. No worry - I'll tackle that one next.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.