Bug #85039 mysqld_safe.pid has incorrect pid in a multi mysql server instances on same host
Submitted: 17 Feb 2017 8:15 Modified: 20 Feb 2017 16:35
Reporter: Vamshi Bhoopalam Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.7.17 OS:Linux
Assigned to: CPU Architecture:Any

[17 Feb 2017 8:15] Vamshi Bhoopalam
Description:
When there are multiple mysql servers installed on the same host with different ports, the mysqld_safe.pid for the second mysql server instance contains wrong process id.

How to repeat:
Start first mysql server instance on a specific port eg: 3388
Start a second mysql server instance on a different port eg: 3377

Observe the mysqld_safe.pid of the second instance. The process id would be of the first mysql server instance.

Expected: the mysqld_safe.pid of the second mysql server instance should contain the process id specific to the second instance.

The workaround is to define the pid-file in the [mysqld_safe] sections.
[20 Feb 2017 16:35] MySQL Verification Team
Hi!

When want to run several MySQL servers on the same OS (operating system), particularly on those of Unix varieties, you have to define two totally different sets of configurations for each of them. Defining just different ports is not enough. You have to define separate datadir's, PID files, sockets, etc, etc ...

This is all explained in our manual, hence this is not a bug.