Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL - Startup Shutdown

Status
Not open for further replies.

mrplaid

IS-IT--Management
Feb 26, 2001
6
0
0
US
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!

Thanks,
mrplaid
 
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,

Mighty :)
 
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?

Thanks,
Matt
 
How do I secure port 3306 mysql. I noticed it running after I installed mysql.



-Danny






 
mrplaid,

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,

Mighty :)
 
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.

Thanks,
mrplaid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top