I was doing some troubleshooting on the init script for the official Percona RPMS and I was wondering about a quirk.
The PID file passed to mysql is generated based on the hostname value of the server. That means if the server name is changed while the mysql process is running, a “service mysql restart” or “service mysql stop” would fail, as it won’t find the PID file.
I cant think of a good reason why the PID file for a process should be based on an arbitrary value like a hostname.
Is there any reason this was done explicitly?