Home > Database > Mysql Tutorial > mysql.server - MySQL server startup script

mysql.server - MySQL server startup script

PHPz
Release: 2023-09-19 14:21:05
forward
758 people have browsed it

mysql.server - MySQL 服务器启动脚本

#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.

  • It changes the location to the MySQL installation directory and then calls mysqld_safe.
  • 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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template