Get the App
SLTechnology News&Howtos  ›  Database  › 

Mysql startup and shutdown (manual and automatic)

Shulou Source: shulou.com Published: 2022-06-01 07:15:50 10月02日 Update

Manual management of mysql startup and shutdown

[root@mysql ~]# service mysql start --manually start mysql

Starting MySQL. SUCCESS!

[root# service mysql stop --manually close mysql

Shutting down MySQL.. SUCCESS!

[root@mysql ~]# mysqld --verbose --help --view MySQL default parameters

If it is troublesome to manually specify parameters every time you start, we can configure the relevant parameters into the parameter file, which will be read when MySQL starts. The location of the parameter file:

On Unix, Linux and Mac OS X, MySQL programsread startup options from the following files, in the specified order (topitems are used first).

Note the order of the parameter files in the above table. MySQL will use the above parameter files first in order from top to bottom, which is similar to the reading order of Oracle SPFILE,PFILE and init files.

Automatic mysql startup management

Description:

1. --If you configure MySQL to automatically enable and disable, you need to add the relevant commands to the/etc/rc* directory.

2. --If installed using RPM packages, the scripts are already deployed to/etc/init.d/mysql and no additional configuration is required.

3. --If the manual deployment starts the startup script, execute the following 2 commands:

shell> cp mysql.server /etc/init.d/mysql

shell> chmod +x /etc/init.d/mysql

Tags: Parameters files manual order configuration commands manual scripts management table above location parameter comparison directory face trouble come to an Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi OPPO Reno NVidia vpn macOS