Bug #54027 confusion when more mysqld are running
Submitted: 27 May 2010 11:19 Modified: 28 May 2010 6:49
Reporter: Susanne Ebrecht Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S2 (Serious)
Version: OS:Any
Assigned to: CPU Architecture:Any

[27 May 2010 11:19] Susanne Ebrecht
Description:
Workbench expect that the following command will output exactly a single result:

ps -C mysqld -o pid=

What if more then one mysqld are running?

Workbench get confused when you have more instances running on same Unix machine.

Especially Administrator Start/Stop server is not working correct anymore.

Also -C is not working as expected on other Unix servers then Linux. What if mysqld is running on Solaris, HP-UX, AIX, FreeBSD or whatever? Consider, ps syntax is different here.

How to repeat:
See above

Suggested fix:
Instead of using "ps -C mysqld -o pid=" it would make more sense to look into the data directory of the server looking for the pid file. Usually, pid file is in data director by default names like computer_name.pid.
[27 May 2010 18:57] Alfredo Kojima
This is not acceptable because:
- data directory usually has restricted permissions, the default login acct used may not have permissions to read it. We do not want to make sudo or usage mandatory. 
- the majority of users run a single server instance and the current detection method is enough for that case. It also is reliable and does not require additional privileges or configuration by the user.
- if the user has more than 1 server running we will need to tell user to supply the data directory each instance uses. So the user will be required to unambiguously configure each instance in WB anyway, even if we change detection method.

So I am marking this as Not a Bug as current behaviour is by design.
[28 May 2010 6:40] Susanne Ebrecht
See also bug #52688 which has more comments.
[28 May 2010 6:49] Susanne Ebrecht
This is a duplicate of bug #52688