Mysql boot (Linux)
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