Bug #55835 Start/Stop server not working
Submitted: 9 Aug 2010 10:28 Modified: 12 Dec 2010 8:54
Reporter: Raith Krace Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:5.2.26 CE OS:Windows (2008 R2)
Assigned to: CPU Architecture:Any
Tags: start stop server switch button refresh status not working

[9 Aug 2010 10:28] Raith Krace
Description:
In the latest version of workbench, the functionality of starting and stopping the server is really impaired. I am connected to the local MySQL server through workbench administration and I try to shut down the server. 
I push the stop server button but on refresh status workbench reports the server is still running. Windows services reports it's stopped and web application report service unavailable so it's clearly not running.
Workbench won't refresh the status properly. When I reopen workbench and try to start the server from there it executes a command states that the server is running but in fact it isn't. The only way to start the server is to start it from Windows services.

How to repeat:
Start Workbench, go to Administration, connect to lacl server, Stop server, check the status as being unchanged (as in running) but check windows services.

Suggested fix:
Using windows services for controlling MySQL service.
[9 Aug 2010 10:59] MySQL Verification Team
Thank you for the bug report. Version are you reporting is 5.2.26?. Which MySQL server are you using?. Thanks in advance.
[9 Aug 2010 11:04] Raith Krace
MySQL Workbench 5.2.26 CE, Revision 6432 , Server 5.1.49 community
[10 Aug 2010 6:55] Susanne Ebrecht
Do you have more then a single server running on your machine?

How do you start/stop server without Workbench?

Are you configured service names correct?

Is MySQL just restarting directly after you stop it?
[10 Aug 2010 7:00] Raith Krace
I have a single a single server on the machine.
I start/stop it using services msc, MySQL start/stop
The services names are the default ones. The whole installation is default.
No, MySQL stops when I tell it to stop under Workbench but keeps reporting it's running. It does not keeps restarting, it stops and stays stopped. The problem is because that Workbench is reporting the service as running and therefore i can't start MySQL using workbench but I cand using services.msc
[12 Aug 2010 11:57] Susanne Ebrecht
Please look into your Workbench instance configuration if you configure the correct service names for start/stop server.
[12 Aug 2010 17:50] Raith Krace
It's correct. Instance is the default mysqld, checked task manager and services configuration and indeed it is the correct setting. By the way, if the setting were incorrect the server wouldn't even stop, which it does, but as stated before the status is reported incorrectly and as such the server cannot be started back again from the workbench.
[24 Aug 2010 23:01] MySQL Verification Team
Thank you for the feedback. I am having different issue, I can't stop/start the server have you experienced that too?. My OS is Vista Premium 64-bit.
[25 Aug 2010 7:27] Raith Krace
well, it mught be the same bug as in mine. Can you start/stop with the windows services?
[28 Aug 2010 11:31] Sveta Smirnova
Thank you for the report.

Do you have UAC option turned ON?
[28 Aug 2010 15:28] Raith Krace
Admin Approval Modew is disabled by default in 2008 server and I am using the administrator account
[7 Sep 2010 9:10] Peter Laursen
I think it is important if it is a 32bit or 64bit server.  Also the old MA tray applet failed to start/stop Windows 64 bit servers.
[7 Sep 2010 9:17] Raith Krace
All R2 servers are 64bit so I guess I'm talking about a very old bug.
[7 Sep 2010 10:39] Peter Laursen
I posted this one: http://bugs.mysql.com/bug.php?id=44993

It was closed as 'wont fix' as MA stopped being developed.  But as a result the report may have been ignored and the old faulty code copied.
[21 Sep 2010 13:14] MySQL Verification Team
Please try version 5.2.28. Thanks in advance.
[21 Sep 2010 13:21] Peter Laursen
error on try to stop server

Attachment: buffer.jpg (image/jpeg, text), 68.91 KiB.

[21 Sep 2010 13:27] Peter Laursen
A comment to the image I just added: server instance is 5.1.50 running on localhost and listening on default port (3306). OS is 64 bit Windows and server is 64 bit.

This is WB "mysql-workbench-gpl-5.2.28-win32.msi"

Besides I had one more error when registering this server: It claimed it could not find configuration file. The configuration file is named 'my.ini' and is in installation folder, so it *should* fin it easily. The whole isntallation is a  standard .msi-installer + config wizard setup. But I was able to proceed to next screen of the wizard.
[24 Sep 2010 0:56] Alfredo Kojima
Does this still occur in 5.2.28? If so, please click the Refresh button in the server start/stop tab and paste the output.
[24 Sep 2010 7:12] Raith Krace
No, the new version, .28 also doesn't work. Nothing has changed since I first reported the bug. I have not changed the MYSQL server instance at all. So you could change the version for the bug report to .28 also.
[24 Sep 2010 7:48] Peter Laursen
When I click 'refresh' log says

2010-09-24 09:44:35 - Checking server status...
2010-09-24 09:44:35 - Executing: 
2010-09-24 09:44:35 - Check server: 
2010-09-24 09:44:35 - Server check returned 0
2010-09-24 09:44:35 - Checked server status: Server is running.

And when I try to stop it:

2010-09-24 09:46:16 - Checked server status: Server is running.
2010-09-24 09:46:16 - Stopping server...
2010-09-24 09:46:16 - Checked server status: Server is running.
2010-09-24 09:46:16 - Could not stop server: expected a character buffer object
2010-09-24 09:46:18 - Checked server status: Server is running.

Note that this is a Windows *64-bit* server! I mention that because the old MA tray applet did not start stop 64 bit MySQL servers, but 32 bit servers were OK.
[28 Oct 2010 22:20] Alfredo Kojima
@Raith Krace

Is your server also 64bit? Can you click the Refresh button and copy/paste the output, as Peter has done?
Also, can you open the Output panel (View -> Output) and paste it's contents if there's anything in there too?
[30 Nov 2010 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[30 Nov 2010 6:26] Raith Krace
R2 is only 64 bit so yes I have a 64 bit system.

2010-11-30 08:21:56 - Checked server status: Server is running.
2010-11-30 08:21:57 - Server is running
2010-11-30 08:24:22 - Checking server status...
2010-11-30 08:24:22 - Executing: sc query mysql | findstr RUNNING (using sudo)
2010-11-30 08:24:22 - Note: no sudo password supplied
2010-11-30 08:24:22 - Check server:         STATE              : 4  RUNNING 

2010-11-30 08:24:22 - Server check returned 0
2010-11-30 08:24:22 - Checked server status: Server is running.
2010-11-30 08:24:24 - Checked server status: Server is running.
2010-11-30 08:24:24 - Stopping server...
2010-11-30 08:24:25 - Checked server status: Server is running.
2010-11-30 08:24:25 - Server stop done.
2010-11-30 08:24:25 - Checked server status: Server is running.
2010-11-30 08:24:26 - Checking server status...
2010-11-30 08:24:26 - Executing: sc query mysql | findstr RUNNING (using sudo)
2010-11-30 08:24:26 - Note: no sudo password supplied
2010-11-30 08:24:26 - Check server: 
2010-11-30 08:24:26 - Server check returned 0
2010-11-30 08:24:26 - Checked server status: Server is running.

Nothing in the output panel.
[9 Dec 2010 8:24] Valeriy Kravchuk
Please, check if the same problem happens with a newer version, 5.2.31, and status command changed to:
 
sc.exe query <MySQL service name> | wba_filter(RUNNING)
[9 Dec 2010 8:40] Raith Krace
Actually the newest version doesn't even let me get into server administration. Itt just gives me an error entitled: Error Starting Workbench Administrator with the explanation text: Exception: Current profile has no WMI enabled. This is a major issue now.
[9 Dec 2010 8:48] Raith Krace
I fixed it. All I had to do is recreate the connection and then I was able to enter server administration. In the new version when I press stop the status doesn't change automatically but when pressing refresh status it no CORRECTLY reports that the server has been stopped. Starting the server also works now. From what I can see the issue has been resolved.

Here are the status messages:
2010-12-09 10:42:43 - Workbench will use cmd shell commands to start/stop this instance
2010-12-09 10:42:43 - Status check of service 'MySQL' returned running
2010-12-09 10:42:45 - Server is running
2010-12-09 10:42:46 - Status check of service 'MySQL' returned running
2010-12-09 10:42:46 - Server stop done.
2010-12-09 10:42:46 - Status check of service 'MySQL' returned running
2010-12-09 10:42:49 - Status check of service 'MySQL' returned stop pending
2010-12-09 10:42:52 - Server is stopped
2010-12-09 10:42:54 - Checking service status of instance MySQL...
2010-12-09 10:42:54 - Status check of service 'MySQL' returned stopped
2010-12-09 10:42:56 - Checking service status of instance MySQL...
2010-12-09 10:42:56 - Status check of service 'MySQL' returned stopped
2010-12-09 10:44:32 - Status check of service 'MySQL' returned stopped

2010-12-09 10:44:32 - Starting server...
2010-12-09 10:44:32 - Status check of service 'MySQL' returned stopped

2010-12-09 10:44:32 - Server start done.
2010-12-09 10:44:32 - Status check of service 'MySQL' returned stopped
2010-12-09 10:44:34 - Server is running

2010-12-09 10:44:40 - Checking service status of instance MySQL...
2010-12-09 10:44:40 - Status check of service 'MySQL' returned running
[10 Dec 2010 7:24] Valeriy Kravchuk
Resolved in 5.2.31 it seems.
[12 Dec 2010 8:42] Raith Krace
Well, it seems that it's back again. The mysql server won't start, but now it correctly reports it's been stopped when doing the operations from workbench.
[12 Dec 2010 8:54] Raith Krace
Please disregard last post. I modified my.ini and the server wouldn't start at all. It's ok now.
[10 Feb 2011 11:58] Tony Ferreira
Hi everyone,

I have a problem in that when I refresh the log or in fact select any other tab in the server administration window, it stops MySqL server or seems to stop as it comes up in red and says "stopped" yet..... 
when I use terminal I can see that mySQL is not stopped ...am not sure about mySql server ?
if I close the workbench server admin window and then reopen, the server is once again started??
I am using a Mac with OSX 10.6.
any ideas?
[10 Feb 2014 13:12] Andrew Irwin
this is happening with me on mac book any help?