Set MariaDB auto-start on CentOS

Source: Internet
Author: User

Set MariaDB auto-start on CentOS

Author: chszs, reprinted with note. Blog homepage: http://blog.csdn.net/chszs

1. Check whether MySQL is in the manageable list.

[root@Cloud-Q2 ~]# chkconfig --list

Abrt-ccpp 0: off1: off2: off3: on4: off5: on6: off
Abrtd 0: off1: off2: off3: on4: off5: on6: off
Acpid 0: off1: off2: on3: on4: on5: on6: off
Atd 0: off1: off2: off3: on4: on5: on6: off
Auditd 0: off1: off2: on3: on4: on5: on6: off
Autofs 0: off1: off2: off3: on4: on5: on6: off
Blk-availability0: off1: on2: on3: on4: on5: on6: off
Certmonger 0: off1: off2: off3: on4: on5: on6: off
Cgconfig 0: off1: off2: off3: off4: off5: off6: off
Cgred 0: off1: off2: off3: off4: off5: off6: off
Cpuspeed 0: off1: on2: on3: on4: on5: on6: off
Crond 0: off1: off2: on3: on4: on5: on6: off
Cups 0: off1: off2: on3: on4: on5: on6: off
Haldaemon 0: off1: off2: off3: on4: on5: on6: off
Ip6tables 0: off1: off2: on3: on4: on5: on6: off
Iptables 0: off1: off2: on3: on4: on5: on6: off
Irqbalance 0: off1: off2: off3: on4: on5: on6: off
Kdump 0: off1: off2: off3: on4: on5: on6: off
Lvm2-monitor 0: off1: on2: on3: on4: on5: on6: off
Mcelogd 0: off1: off2: off3: on4: off5: on6: off
Mdmonitor 0: off1: off2: on3: on4: on5: on6: off
Messagebus 0: off1: off2: on3: on4: on5: on6: off
Mysqld 0: off1: off2: off3: off4: off5: off6: off
Netconsole 0: off1: off2: off3: off4: off5: off6: off
Netfs 0: off1: off2: off3: on4: on5: on6: off
Network 0: off1: off2: on3: on4: on5: on6: off
Nfs 0: off1: off2: off3: off4: off5: off6: off
Nfslock 0: off1: off2: off3: on4: on5: on6: off
Ntpd 0: off1: off2: off3: off4: off5: off6: off
Ntpdate 0: off1: off2: off3: off4: off5: off6: off
Numad 0: off1: off2: off3: off4: off5: off6: off
Oddjobd 0: off1: off2: off3: off4: off5: off6: off
Portreserve 0: off1: off2: on3: on4: on5: on6: off
Postfix 0: off1: off2: on3: on4: on5: on6: off
Postgresql 0: off1: off2: off3: off4: off5: off6: off
Psacct 0: off1: off2: off3: off4: off5: off6: off
Quota_nld 0: off1: off2: off3: off4: off5: off6: off
Rdisc 0: off1: off2: off3: off4: off5: off6: off
Restorecond 0: off1: off2: off3: off4: off5: off6: off
Rngd 0: off1: off2: off3: off4: off5: off6: off
Rpcbind 0: off1: off2: on3: on4: on5: on6: off
Rpcgssd 0: off1: off2: off3: on4: on5: on6: off
Rpcsvcgssd 0: off1: off2: off3: off4: off5: off6: off
Rsyslog 0: off1: off2: on3: on4: on5: on6: off
Saslauthd 0: off1: off2: off3: off4: off5: off6: off
Smartd 0: off1: off2: off3: off4: off5: off6: off
Sshd 0: off1: off2: on3: on4: on5: on6: off
Sssd 0: off1: off2: off3: off4: off5: off6: off
Sysstat 0: off1: on2: on3: on4: on5: on6: off
Udev-post 0: off1: on2: on3: on4: on5: on6: off
Winbind 0: off1: off2: off3: off4: off5: off6: off
Ypbind 0: off1: off2: off3: off4: off5: off6: off

2. If mysqld is not in the list, run the following command to add it:

# chkconfig add mysqld
We can see that mysqld is in the list, so we skip this step.

3. Run the following command to set startup:

# chkconfig add mysqld

We checked the list again and found that the result was as follows:
......
Mysqld 0: off1: off2: on3: on4: on5: on6: off
......

It indicates that the automatic startup of MariaDB has been set.


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.