Get the App
SLTechnology News&Howtos  ›  Database  › 

Mysql boot (Linux)

Shulou Source: shulou.com Published: 2022-06-01 05:05:30 10月05日 Update

Reason: the virtual machine is installed on the computer, and the mysql database is installed on the virtual machine, because the computer has to be turned on and off every day, and the mysql service needs to be turned on manually after it is turned on the next day, because the blogger is lazy, so it is made to start automatically.

Note: automatic start-up is not usually made in production.

The steps are as follows:

1. Check to see if mysql services are available

[root@mysql1] # chkconfig-- list

2. Enter the mysql software directory and copy the mysql.server file to the / etc/rc.d/init.d directory

[root@mysql1 ~] # cd / data/mysql/support-files

[root@mysql1 support-files] # cp mysql.server / etc/rc.d/init.d/mysql

3. Assign executable permissions to / etc/rc.d/init.d/mysql

[root@mysql1 support-files] # chmod + x / etc/rc.d/init.d/mysql

4, add mysql service

[root@mysql1 support-files] # chkconfig-- add mysql

5, make the mysql service boot automatically

[root@mysql1 support-files] # chkconfig-- level 345 mysql on

6 refine reboot server to test whether it is successful or not.

Some people only teach to get on the bus, but not to get out of the car.

Note: boot does not start automatically

[root@mysql1 support-files] # chkconfig-- level 345 mysql off

Tags: Services remarks computers directories success otherwise upload reasons manual data databases files servers permissions steps production or empowerment software Tiandu Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi vpn Huawei Docker Apple