当MySQL实例启动时,会将自己的进程ID写入一个文件中——该文件即为pid文件。该文件可由参数pid_file控制,默认位于数据库目录下,文件名为主机名.pid:
mysql> show variables like 'pid_file'\G;
*************************** 1. row ***************************
Variable_name: pid_file
Value: /usr/local/mysql/data/xen-server.pid
1 row in set (0.00 sec)