Public bug reported:

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

** Affects: mysql-workbench (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  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
+     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 not a weak approach due to parsing output, and it does not take i18n
- into account.
+ 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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1220617

Title:
  Workbench is unable to properly identify server status
  (running/stopped)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-workbench/+bug/1220617/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to