MySQL sets a self-starting fault solution in Ubuntu, mysqlubuntu
A fault solution for Setting Automatic startup for MySQL in Ubuntu
Author: chszs, reprinted with note. Blog homepage: http://blog.csdn.net/chszs
When MySQL is self-started, run the following command:
# chkconfig --listThe program 'chkconfig' is currently not installed. You can install it by typing:apt-get install chkconfig
If the chkconfig script is not installed, install it:
root@i-DFAFA998:~# apt-get install chkconfigReading package lists... Done……
Run the following command after installation:
# chkconfig --list | grep mysqlmysql 0:off 1:off 2:off 3:off 4:off 5:off 6:off
It can be seen that MySQL is not a self-starting service.
When you use chkconfig to enable MySQL to start itself, the following error occurs when you run the command:
# chkconfig -a mysql/sbin/insserv: No such file or directorymysql 0:off 1:off 2:off 3:off 4:off 5:off 6:off
The solution provided on the Internet is:
# ln -s /usr/lib/insserv/insserv /sbin/insserv
Run the command to continue reporting errors
# chkconfig mysql onThe script you are attempting to invoke has been converted to an Upstartjob, but lsb-header is not supported for Upstart jobs.insserv: warning: script 'mysql' missing LSB tags and overridesinsserv: Default-Start undefined, assuming empty start runlevel(s) for script `mysql'......
Continue to find the cause and find:
The chkconfig command is used for the RedHat/Fedora release. for Debian releases such as Ubuntu, use this command:
sudo update-rc.d mysql defaults
Verify:
# chkconfig --list | grep mysqlmysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
It's done!
Finally, Let's remind you not to forget to delete the previously established symbolic connection.
# rm -f /sbin/insserv