MySQL prompt service mysql3306 does not support Chkconfig error

Source: Internet
Author: User

Today, when you install a MySQL multiple instance, this problem, let MySQL support boot from boot, but the following error prompts:

Root@localhost ~]# Chkconfig–add mysql3306

Service mysql3306 does not support Chkconfig

After a look at the data, make it clear, in the startup script #!/bin/sh must be added after the code

#gedit/etc/init.d/mysql3306

# chkconfig:2345 10 50

# description:mysql3306

2345 is the default startup level, and the level has 0-6 total 7 levels.

Level 0 means: the shutdown

Level 1: Single user mode

Level 2 means: Multi-user command-line mode with no network connection

Level 3 means: Multi-user command-line mode with network connections

Level 4 indicates: Not available

Level 5 means: Multi-user mode with graphical interface

Level 6 indicates: reboot

10 is the start priority, 90 is the stop priority, the priority range is 0-100, the larger the number, the lower the priority.

Run-level files:
Each service managed by Chkconfig needs to be annotated with two or more lines of script under the corresponding INIT.D. The first line tells Chkconfig the run level of the default boot and the priority of start and stop. If a service does not start at any run level by default, then use – instead of run level. The second line describes the service, and you can use a cross row annotation.
For example, Random.init contains three lines:
# chkconfig:2345 20 80
# Description:

For example, how to add a service:
1. Service scripts must be stored in the/etc/ini.d/directory;
2.chkconfig–add ServiceName
Add this service to the Chkconfig tool Services list, at which point the service is given a k/s entry in the/ETC/RC.D/RCN.D;
3.chkconfig–level mysqld on
Modify the default boot level for the service.

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.