Description:
I am new to MySQL, so this is probably my mistake. But I have installed MySQL 5.1.53 and Workbench 5.2.30 on Windows XP. I set up MySQL with Windows Services under the name 'MySQL'. I opened up workbench to set up a server instance.
Screen 1: I select 'localhost'.
Screen 2: I enter username 'root'.
Screen 3: Testing the database connection is successful.
Screen 4: Testing host machine settings fails for Check MySQL Configuration File. The screen gives the following error output:
What find_config_file/local
Check if can be accessed
Operation failed: File doesn't exist
What find_config_file/local
Check if can be accessed
Operation failed: File doesn't exist
I click 'Next'
Screen 5: There's the following output:
SSH Based Adminstration: No
MySQL Configuration
MySQL Version: 5.1.53-community
Settings Template: Custom
Path to Configuration File:
Instance Name in Configuration File:
Commands for MySQL Management
Start MySQL:
Stop MySQL:
Check status:
I check 'Change my parameters' and click 'Next'.
Screen 6: In 'Path to configuration file', I browse to: C:\Program Files\MySQL\MySQL Server 5.1\my.ini. Check path gives, 'The config file path is valid'. In 'Section of the Server Instance', I enter 'mysqld'. Check name gives, 'The config file section is valid'. I click next.
Screen 7: The boxes are empty. So in 'Command to start the MySQL server', I enter 'sc start MySQL'. In 'Command to stop the MySQL server', I enter 'sc stop MySQL'. In 'Status check command', I enter 'sc query MySQL | wb_filter(RUNNING)'. I leave checked the box 'Check this box if you want...' and click next.
Screen 7: The server instance name is already entered as 'mysqld@localhost'. I click finish.
Next in WB, I double click the 'mysqld@localhost' instance. The startup message log says:
2010-12-09 15:24:56 - Server is running
I click 'Stop server'. I am prompted by windows in a 'Run as' dialog box. I click ok. The screen output is:
2010-12-09 15:24:56 - Server is running
2010-12-09 15:25:20 - Stopping server...
2010-12-09 15:25:20 - sc stop MySQL (with sudo)
2010-12-09 15:26:08 - Server stop done.
But under the Database Server Status, it says 'The database server instance is running'. If I go to the command prompt and enter 'sc query MySQL', the output is :
SERVICE_NAME: MySQL
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE,PAUSABLE,ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
Now, if I enter from the command prompt: 'sc stop MySQL', the output is:
SERVICE_NAME: MySQL
TYPE : 10 WIN32_OWN_PROCESS
STATE : 3 STOP_PENDING
(STOPPABLE,PAUSABLE,ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x1
WAIT_HINT : 0x5265c00
If I again enter 'sc query MySQL', the output is
SERVICE_NAME: MySQL
TYPE : 10 WIN32_OWN_PROCESS
STATE : 1 STOPPED
(NOT_STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
If I go back to the 'Server Status' screen WB, the status says the 'The database server instance is stopped'. I try to start the server. The output is:
2010-12-09 15:24:56 - Server is running
2010-12-09 15:25:20 - Stopping server...
2010-12-09 15:25:20 - sc stop MySQL (with sudo)
2010-12-09 15:26:08 - Server stop done.
2010-12-09 15:30:50 - Server is stopped
2010-12-09 15:32:50 - Checked server status: Server is stopped.
2010-12-09 15:32:50 - Starting server...
2010-12-09 15:32:50 - sc start MySQL (with sudo)
2010-12-09 15:32:53 - Checked server status: Server is stopped.
2010-12-09 15:32:53 - Server start done.
2010-12-09 15:32:54 - Checked server status: Server is stopped.
The server instance is still stopped. But when I go to the command line and enter 'sc start MySQL', I get the following output:
SERVICE_NAME: MySQL
TYPE : 10 WIN32_OWN_PROCESS
STATE : 2 START_PENDING
(NOT_STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x7d0
PID : 5800
FLAGS :
When I enter at the command line 'sc query MySQL', I get the following output:
SERVICE_NAME: MySQL
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE,PAUSABLE,ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
When I go back to WB, it sayd, 'the database server status is running.'
So in summary: I can't start or stop the database server with WB, but I can start/stop with the command line. The status is shown correctly in WB.
Any idea what is going on?
How to repeat:
See above.
Suggested fix:
Use command line.