Workbench is unable to properly identify server status (running/stopped)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-workbench (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Using the default settings when creating a new "Server Instance", assuming the mysql daemon is running and selecting "Ubuntu Linux Upstart (MySQL Package)" as the installation type, Workbench uses the following commands to probe the server:
Start MySQL: start mysql
Stop MySQL: stop mysql
Check status: status mysql
Use sudo: Yes
Workbench interprets the status via exit code, and "status mysql" always return 0 regardless if the daemon is running or not, so it thinks the server is always RUNNING, even when it is at STOPPED state.
As a consequence of this discrepancy, several errors pop up. And workbench does not offer a "Start" button, since it thinks server is already started.
One trivial workaround is to customize the "Check" command and change it to:
status mysql | grep 'running'
I've chosen 'running', but 'start' and 'process' would also work. This is a weak approach due to parsing output, and it does not take i18n into account.
A proper solution would be to either make mysql's upstart script to use different exit codes depending on status, or to make Workench smart enough to properly probe for the server status
description: | updated |