An example of setting MySQL auto-start fault in Ubuntu

Source: Internet
Author: User

An example of setting MySQL auto-start fault in Ubuntu

Run the following command to solve MySQL self-startup in Ubuntu:

# Chkconfig -- list
The 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@www.bkjia.com :~ # Apt-get install chkconfig
Reading package lists... Done
......

Run the following command after installation:

# Chkconfig -- list | grep mysql
Mysql 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 directory
Mysql 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/sbin/insserv

Run the command to continue reporting errors

# Chkconfig mysql on
The script you are attempting to invoke has been converted to an Upstart
Job, but lsb-header is not supported for Upstart jobs.
Insserv: warning: script 'mysql' missing LSB tags and overrides
Insserv: 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 mysql
Mysql 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.