Bug #31355 could not start service MySQL server 5.0
Submitted: 2 Oct 2007 21:04 Modified: 19 Nov 2010 20:42
Reporter: RUBIO MONICA Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Installing Severity:S1 (Critical)
Version:5.0.45 OS:Windows (XP Home edition)
Assigned to: CPU Architecture:Any

[2 Oct 2007 21:04] RUBIO MONICA
Description:
Hi,
When running MySQL Server Instance 
Configuration (configure the mysql 5.0 server instance), it does the following:

- prepare configuration: OK
- write configuration file (C:\archivos de programa\mysql\mySQL Server 
5.0\my.in : OK
- Start service: ERROR
- apply security settings: it does execute

it gives the following error:

could not start the service MySQL.Error: 0

Proxy and firewall are disabled.  Port 3306 is open in router and in firewall, and port is not used by any other application I figure out.

Following instructions in forum, I have execute the following command:

C:\Archivos de programa\MySQL\MySQL Server 5.0\bin>mysqld-nt --defaults-file="c:
\archivos de programa\mysql\mysql server 5.0\my.ini" --standalone --console

the output is:

                                              ;InnoDB: End of page dump
071002 23:01:07  InnoDB: Page checksum 1575996416, prior-to-4.0.14-form checksu
 1371122432
InnoDB: stored checksum 0, prior-to-4.0.14-form stored checksum 0
InnoDB: Page lsn 0 0, low 4 bytes of lsn at page end 0
InnoDB: Page number (if stored to page already) 0,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0

C:\Archivos de programa\MySQL\MySQL Server 5.0\bin>mysqld-nt --defaults-file="c
\archivos de programa\mysql\mysql server 5.0\my.ini" --standalone --console
071002 23:01:17  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
071002 23:01:17  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43655.
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
InnoDB: Page directory corruption: supremum not pointed to
071002 23:01:17  InnoDB: Page dump in ascii and hex (16384 bytes):
 len 16384; hex 000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000

it continues writing 0s

I downloaded and installed: mysql-5.0.45-win32.zip

How can I fixed it.

How to repeat:
Intalling again the mysql server 5.0.  I have tried to uninstalled and to installed at least 20 times with no sucess.
[2 Oct 2007 21:08] RUBIO MONICA
I found this file created in the data directory with error information

Attachment: Monica.zip (application/x-zip-compressed, text), 36.18 KiB.

[3 Oct 2007 3:15] Valeriy Kravchuk
According to that file you uploaded, error log, you had 5.0.45 installed and working for several days. Then, upon one of the startups, it had found a corruption on InnoDB pages (they are filled with zeros, as you can see), and can not start any more. Re-installations will not help until you fix that problem with pages.

So, please:

1. Copy your entire data directory into some safe place.
2. Remove all the files from the data directory (you can not access your data anyway)
3. Try to install again, without your corrupted file(s).

If you will not be able to install successfully in th, it is installation bug.

The other problem is corrupted data file. Do you have any antivirus software installed?
[4 Nov 2007 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".
[25 Nov 2007 19:43] Cedric Graebin
I had the same error over and over again, and then I did the following and it worked for me.

1) In the Windows Firewall settings, you have to manually add port 3306 (standard port for mysqlserver) to the exception list

2) Erase all the files in the MySQL/MySQL Server 5.0/Data folder

3) Re-run the setup program and choose to "repair" the installation

4) Re-run the MySQL Instance Config Wizard, using the usual configurations and marking the "include in Windows PATH etc..."

It worked for me...
[22 Mar 2008 16:56] tom corcoran
@Cedric Graebin - same problem with 5.0.51. This solution worked for me, thanks.
[8 Mar 2009 12:34] rujuta sinha
Thanx Cedric Graebin !! Its working fine now!!
[6 May 2009 5:46] Giovanni Garcia
I have an Aspire one, processor intel Atom and windows XP home edition SP3. I've tried your method with no success. I have use the most recent version of the Mysql essentials, in two laptops works fine, one with XP Professional and another with Vista Home. The service I must to declare the firewall exception in "fail proof mode", in normal sesion I can't do that. Please, I don't want to format and re-install windows with Professional license. 

thanks.

Giovanni
[8 Mar 2010 8:22] mahaveer singh
GURANTEED SOLUTION- IT WORKS

MYSQL service creates a process called "mysqld.exe"- which you can locate under the running processes of task manager. If MYSQL service is not running you will not be able to find the "mysqld.exe" in processes list- under task manager.

To check whats wrong with the MYSQL service use this command:
mysqld --console. this command should be run from the bin directory of installed MYSQL .

Go to the c:\program files\ mysql\ mysql server 5.1\ bin > directrory and run the command mysqld --console. plz see the screenshot. "This command will tell you anything wrong with the MYSQL SERVICE".

screenshot :

C:\Program Files\MySQL\MySQL Server 5.1>cd bin

C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqld --console
100305 19:40:12 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: Error: log file .\ib_logfile0 is of different size 0 36700160 bytes
InnoDB: than specified in the .cnf file 0 10485760 bytes!
100305 19:40:12 [ERROR] Plugin 'InnoDB' init function returned error.
100305 19:40:12 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

100305 19:40:12 [ERROR] Unknown/unsupported table type: INNODB
100305 19:40:12 [ERROR] Aborting

100305 19:40:12 [Note] mysqld: Shutdown complete 

in this case the ib_logfile0  file was bigger then the predfined size.

Solution :   is to delete ib_logfile0  and ib_logfile1 files from the C:\Program Files\MySQL\MySQL Server 5.1\data folder and then try to restart the MYSQL service manually. the MYSQL Service wil come up and you will see mysqld.exe process running under process list. 
 IF YOU GET THE SAME ERROR IN COMAND PROMPT AFTER RUNNING THIS COMMAND THEN U DONT HAVE TO SEARCH NYTHING JUST APPLY THIS SOLUTION  N IT WILL WORK .

try to log in using MYSQL ADMINISTRATOR  , it will work  and if not  then configure a new instance and this time it will allow you to create a new instance sucessfully. 

NOTE:IF YOUR MYSQL SERVICE NOT RUNNING OR FAILING ->RUN THE "MYSQLD -- CONSOLE" COMMAND IN THE GIVEN DIRECTORY ONLY AND IT WILL SHOW YOU THE ERROR YOUR MYSQL SERVICE IS CONTAING. N WHATEVER ERROR YOU GET IN THE COMMAND PROMPT - SERACH THAT ERROR ON GOOGLE. COZ THERE CAN BE DIFFERENT ERRORS WITH MY SQL SERVICE. MYSQLD -- CONSOLE COMMAND WILL GIVE YOU THE RIGHT DIRECTION TO TROUBLESHOOT.

NOTE ; IF YOU PLAN TO UNINSTALL YOUR MYSQL THEN FIRST STOP THE MYSQL SERVICE FROM SERVICES.MSC IN START - RUN - CMD ,,,,,  AND ALSO MAKE SURE U DELETE IT FROM ADD/REMOVE PROGRAMS AND MANUALLY DELETE FROM C:\PROGRAM FILES\ MYSQL SERVER. AND MAKE SURE U RUN "REGEDIT" TO CONFIRM THAT THE MYSQL SERVICE IS REMOVED.
[8 Mar 2010 18:13] Giovanni Garcia
so late your answer sister, but I have to say the trouble was so easy to repair, just uninstall the damn Macafe Antivirus, or if you like such antivirus, just disable when start Mysql service in windows. I prefer (and I do) the first option.
Macafe always blocks the mysql service, done job and works perfectly.

Best regards, I will try later your answer, when definitely won't run.
[11 Apr 2010 9:11] Kalpit Shukla
Uninstall MySQL

then,

Need to delete the Data files present in DEFAULT LOCATION C:\ProgramData\MySQL
*************

C:\ProgramData\MySQL

*************

Note: The folder ProgramData is hidden and invisible in Windows 7, Use Tools -> Folder Options > Change the folder settings to show hidden files.

Reinstall MySQL.
[17 Nov 2010 11:13] Gabriel Bauermann
Very good Kalpit Shukla. Your solution solved my problem.
Thanks
[19 Nov 2010 20:42] Sveta Smirnova
Closing as "Not a Bug" as according to Valeriy's findings original problem is not result of MySQL bug.
[4 Sep 2012 3:03] Michael Wilkes
Many thanks to  mahaveer -- finally solved my problem where the Service would not start from the instance configuration program!
[4 Oct 2012 7:07] Marko Mäkelä
The log file size problem is Bug#13494.