Linux setup MySQL boot up

Source: Internet
Author: User

Linux start-up programs are generally placed in the/etc/rc.d/init.d/,/etc/init.d/is its soft connection

MySQL Set as Linux service

Cp/usr/local/mysql5/share/mysql/mysql.server/etc/init.d/mysqld

Chkconfig--add mysqld chkconfig--level 2345 mysqld on

Chown Mysql:mysql-r/usr/local/mysql5/

Service mysqld Start

You can then use the Setup command to enter the service settings, set to boot

Additional notes:

This is a program developed by Redhat company in accordance with the GPL rules, which can query what system services the operating system performs in each execution level (RunLevel), including various daemon. The Linux OS divides the operating environment into the following 7 levels:

0: Boot (please do not switch to this level)

1: Text interface for single user mode

2: Multi-person user mode text interface, does not have the network File system (NFS) function

3: Multi-person user mode text interface, with Network File system (NFS) function

4: Some distributions of Linux use this level to enter the X Windows system

5: Some distributions of Linux use this level to enter the X Windows system

6: Restart

Parameters:

--add adding the specified system service

--del Delete the specified system service

--LEVEL specifies in which execution level the system service is to be turned on or off

--list List all system services and rank codes currently available from the CHKCONFIG directive

On/off/reset on/off/reset the system service at the specified execution registration

The Chkconfig command is primarily used to update (start or stop) and query run-level information for system services. Keep in mind that Chkconfig does not immediately automatically disable or activate a service, it simply changes the symbolic connection.

Grammar:

Chkconfig--list [Name]

Chkconfig--add Name

Chkconfig--del Name

Chkconfig [--level levels] name <on|off|reset>

Chkconfig [--level levels] Name

Example:

1. View the status of each service in various levels of execution: $chkconfig--list

2. List the boot status of the system service VSFTPD at each execution level: $chkconfig--list vsftpd

3. At execution level 3, 5 o'clock, turn off VSFTPD system service: $chkconfig--level vsftpd off

4. When performing level 2,3,5, turn on VSFTPD system service: $chkconfig--level 235 vsftpd on

5. Close some of the services you don't need:

If there is no printer: Chkconfig--level 235 cups off

If there is no LAN: Chkconfig--level 235 SMB off

If a remote user is not required to log on: Chkconfig--level 235 sshd off

If you do not need a scheduled task: Chkconfig--level 235 Crond off

If you do not need to add New hardware: Chkconfig--level 235 kudzu off

Linux setup MySQL boot up

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.