#mysql.server will change the location to the MySQL installation directory. It will then call mysqld_safe. To run the server as a specific user, add the appropriate user options to the [mysqld] group of the global /etc/my.cnf options file.
To run the server as a specific user, you can add the appropriate user options to the [mysqld] global /etc/my.cnf options file group.
If mysql.server is installed in a non-standard location as a binary distribution of MySQL.
This location must be modified to change the location to the correct directory before running mysqld_safe.
After completion, if MySQL is upgraded in the future, the modified mysql.server version will be overwritten. Make sure to make a copy of the edited version so you can reinstall it.
mysql.server stop Stops the server by sending a signal to the server. It can also be stopped manually by executing mysqladmin shutdown.
Let’s understand some command line options related to this -
basedir =dir_name
refers to the MySQL installation The path to the directory.
datadir=dir_name
refers to the path of the MySQL data directory.
pid-file=file_name
It refers to the pathname of the file in which the server writes its process ID. The server creates the file in the data directory, otherwise an absolute pathname is given to specify a different directory.
service-startup-timeout=seconds
It tells the time in seconds that the user must wait for server startup confirmation. If the server is not started within this time, mysql.server will exit with an error. The default value is 900. A value of 0 indicates that the user should not wait for startup at all. A negative value means waiting forever (this refers to the case where there is no timeout).
The above is the detailed content of mysql.server - MySQL server startup script. For more information, please follow other related articles on the PHP Chinese website!