Bug #43673 The service could not be started. Error: 0
Submitted: 16 Mar 2009 11:00 Modified: 17 Mar 2009 7:52
Reporter: David Persson Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.1.32 OS:Windows (XP (SP3))
Assigned to: CPU Architecture:Any
Tags: installation, root password, service, start

[16 Mar 2009 11:00] David Persson
Description:
I use Win XP sp3, installing MySQL with 
"mysql-5.1.32-win32.msi".

I seem to have the same problem as described in bug report 43295, which you seemingly failed to really understand, but I will try to clarify some parts.

I previously had a working installation of MySQL 5.1 (same version), which was uninstalled.
When I install it again, it requires the old root password to change the root password, even though it is a new installation and I deleted all remaining files manually after the uninstallation (which was performed by-the-book).

I have tried uninstalling and installing again several times, with system rebooting in between, etc.

The "Data" directory under the MySQL installation directory does not (repeat: NOT) exist -- it is NOT created during second+ installations. After a few tries, I tried creating it (the Data directory) manually, but the service still will not start, and no (repeat: NO) error files are generated anywhere.

I am pretty sure this is a registry problem, since there were no problems with the very first installation, so I believe the whole clean-up process during uninstallation must be looked over, so that the program is truly uninstalled from the system, instead of just having the program files deleted.

Also, a separate system clean-up program should be provided for all of us who have had MySQL installations on WinXP that were removed, but now wish to install it again.

How to repeat:
On WinXP sp3:

Install MySQL 5.1. Use GUI for configuration, stating root passwords and allow remote root access.

Uninstall MySQL.

Install MySQL again. Try configure with GUI.
The service will not start.

Suggested fix:
Provide a registry MySQL clean-up program.
[16 Mar 2009 14:11] Peter Laursen
@david

This is definitey not a registry problem. MySQL does not use registry for storing this info (only details requried for starting and uninstalling the *msyql service* are stored in registry).  MySQL is a unix program basically and it will not use registry for internal data - only for the *mysql service* ti will becuase if not Windows would fail to start the service at startup.

This "The 'Data' directory under the MySQL installation directory does not (repeat: NOT) exist" tells what you do not seem to understand!

Recent server versions do not (as default) install the /datadir *under the MySQL installation directory* on Windows but in the "All Users"'s 'AppData' folder.

XP etc: c:\documents and settings\all users\application data\mysql ...
Vista etc: c:\program data\mysql etc.

Note that the /datadir folder may have localised names and may be a hidden folder (unless you from Control Panel .. Folder Options have chosen to unhide hidden folders)

The reason why the default /datadir postion was changed was because of Windows 'User Account Control' feature introduced in Vista/2008/Win7.  Various problems occur with UAC turned ON and data storage in the \program files folder.

So I guess you simply *did not* (contrarily to what you thought) deleted all folders related to the old installation - because you did not know where to find them! You are installing on top of an existing `mysql` database (where the root password is stored).

Peter
(not a MySQL person)
[16 Mar 2009 14:23] Peter Laursen
Sorry - too many typos in what I wrote! Please replace:

"MySQL is a UNIX program basically and it will not use registry for internal
data - only for info related to the *mysql service* it will, because if it did not Windows would fail to start the service (or *daemon* if you prefer UNIX terminology) at the OS startup."
[16 Mar 2009 19:54] David Persson
I sorted it out on my own...

I uninstalled again, then manually deleted everything in the registry related to MySQL, rebooted, tried reinstalling it one more time... 
and voila - it worked.

(Just be careful you all who will try this. Don't delete whole chunks from the registry just because the world "MySQL" is in it, with some bad luck this could really mess up your OS. If you don't know which entries to delete, get some help.)
[16 Mar 2009 20:03] David Persson
Well... except for acknowledging the typo "world", I should clarify that "related to MySQL" means "related to the MySQL server installation".  There are MySQL-entries related to other things, such as PHP -- naturally you shouldn't remove those.
[17 Mar 2009 7:52] Sveta Smirnova
David,

thank you for the report. I assume this was not MySQL bug, but some problem with your environment and close the report as "Not a Bug". Feel free to reopen it if you disagree.
[7 May 2009 0:11] timothy marks
How about modifying the installation or "un"-installation where the program should give you the option of removing data files created for those who choose this procedure. By the way I have received the same problems as other users where the service failed to start, upon re-installation.