I recently added
mysql.server to start during the start up by doing this:
cd /etc/rc.d/rc5.d/ ln -s /etc/init.d/mysql.server S98mysql
I have perhaps not correctly understood the
<number> part of
k<number>script naming convention for the RC scripts.
Although, I know that it’s for: representing the order in which the script will be executed during the run of runlevel control script.
S98mysql from: How To Install MySQL : 6.0 Automatic MySQL Start-up during boot
But MySQL does not start during startup. Will show this message when trying to connect (as expected):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Works fine if I do a manual start with:
What am I doing wrong?
I am using
If you are using Fedora you might want to use chkconfig.
To see what run levels a particular service is enabled for, you can do something like this
chkconfig –list mysqld
To change the behavior for certain run levels for a service you can do something like this:
chkconfig –levels 345 mysqld on
or since your init.d script has a different name
chkconfig –levels 345 mysql.server on
If a service isn’t listed in chkconfig you can add it with the –add flag. Use the script name in /etc/init.d
chkconfig –add mysql.server
Here is some more information on run levels:
Most servers only go to run level 3 which would mean that run level 5 is not reached so the service would not be started in your example.
Most desktops go to run level 5 since that is when the graphical interface (X) starts
No related posts.
Leave a comment
- What is the easiest way to upgrade my existing Perl 5.14 to Perl 5.16 on FreeBSD 9 using the ports system?
- Know if mysql has done its job
- Redirect https .com to https .co.uk without a valid SSL cert on .com without DNS change
- Why is it a bad idea to use customer email as from address
- 100% packets dropped on first RX queue on 3/5 raid6 iSCSI NAS devices using intel igb (resolved)