Bug #59365 workbench uses wrong command to check for daemon on MacOSX
Submitted: 8 Jan 2011 0:10 Modified: 4 Sep 2012 22:17
Reporter: Benson Margulies Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench: Administration Severity:S2 (Serious)
Version:5.2.31 OS:MacOS
Assigned to: CPU Architecture:Any

[8 Jan 2011 0:10] Benson Margulies
The 'server status' check does not work when pointing at MacOSX.

The problem is the pathname of the macosx installation.

With the current community server, the pathname in mysql is a versioned pathname:

 74 17030 16796   0   0:05.77 ttys002    0:15.80 /usr/local/mysql-5.5.8-osx10.6-x86_64/bin/mysqld --basedir=/usr/local/mysql-5.5.8-osx10.6-x86_64 --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql-5.5.8-osx10.6-x86_64/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/quigly.basistech.net.err --pid-file=/usr/local/mysql/data/quigly.basistech.net.pid --socket=/tmp/mysql.sock --port=3306

So the following failes to see it

2011-01-07 19:01:38 - Executing: ps xa | grep "/usr/local/mysql/bin/[m]ysqld"
2011-01-07 19:01:38 - Server check returned 1
2011-01-07 19:01:38 - Checked server status: Server is stopped.

How to repeat:
Install Server version: 5.5.8 MySQL Community Server (GPL) on MacOSX from the package.

Install 5.2.21 of the workbench on some other MacOSX machine.

Configure the later to administer the former via SSH.

Suggested fix:
Fix the pathname in the ps command, or make it configurable.
[8 Jan 2011 9:20] Valeriy Kravchuk
Is it really 5.2.21? If it is, please, check with a newer version, 5.2.31. 

In my case I see grep searching just for [m]ysqld, but I am not sure if it was so by default.
[8 Jan 2011 19:33] Benson Margulies
I typoed the version, it is 31. I've since discovered the place where I can actually patch up the ps command.
[8 Jan 2011 19:48] Valeriy Kravchuk
Indeed, this is the command used by default for server on Mac OS X:

Checking command 'ps xa | grep "/usr/local/mysql/bin/[m]ysqld"'

So, my version was already patched by a proper command. This is only a good workaround though.
[4 Sep 2012 22:17] Philip Olson
Fixed as of the upcoming Workbench 5.2.43, and here's the changelog entry:

  On Mac OS X, the "Server Status" tool would fail to find the server. 

Thank you for the report.