MySQL Variables pid_file 数据库 参数变量解释及正确配置使用

本站中文解释

MySQL参数变量pid_file表示MySQL守护进程的PID文件的名称和位置,记录MySQL数据库服务的进程标识符,在某种条件下面,可以用来查看MySQL正在运行的服务器PID。

要修改此参数,可以使用以下命令:

set global pid_file=’新文件路径/new_pid_file’;

修改完成后,要重启MySQL服务,使新设置生效:

sudo service mysql restart

官方英文解释

pid_file

Command-Line Format --pid-file=file_name
System Variable pid_file
Scope Global
Dynamic No
Type File name

The path name of the file in which the server writes its
process ID. The server creates the file in the data directory
unless an absolute path name is given to specify a different
directory. If you specify this variable, you must specify a
value. If you do not specify this variable, MySQL uses a
default value of
host_name.pid,
where host_name is the name of the
host machine.

The process ID file is used by other programs such as
mysqld_safe to determine the server’s
process ID. On Windows, this variable also affects the default
error log file name. See Section 5.4.2, “The Error Log”.


数据运维技术 » MySQL Variables pid_file 数据库 参数变量解释及正确配置使用