"Error 1067: The process terminated unexpectedly" when trying to install MySQL on Win7 x64 [closed]
I've run into a brick wall trying to install MySQL v5.5 on my machine.
My PC is Windows 7 x64, Enterprise edition.
MySQL installs fine, but when I run the "MySQL Instance Configuration Wizard", it pauses forever on the step "Start Service" (I can let it run for 30 minutes with no response). If I go into services, I see that the "MySQL" service hasn't started, and if I try to start it, it says "Windows could not start MySQL Service on Local Computer. Error 1067: The process terminated unexpectedly."
I've tried the following:
- Turning off firewall.
- Uninstalling all antivirus software.
- Installing / reinstalling 32-bit version of MySQL.
- Installing / reinstalling 64-bit version of MySQL.
- Uninstalling, deleting the contents of "C:\program files\MySQL" and "C:\program files (x86)\MySQL", reinstalling.
- Checking to see that there is no rogue services named MySQL???? (from a previous install).
- Checking that port 3306 is not used by an alternate program.
- Changing the default port that MySQL uses.
- Checking for "my.ini" and "my.ini.cnf" in "C:\windows" (nothing there but that can cause a problem).
- Running both MySQL installer, and configuration wizard, in "Adminstrator mode".
- Turning off UAC.
- Installing with defaults, not changing anything.
- Rebooting my machine (about 6 reboots so far).
- Opening up port 3306 in the firewall (both TCP and UDP, inbound and outbound).
- Swearing at the klutz of a programmer who designed MySQL so you can't even install it (as if that would help!)
My machine is working 100% in every other way. InfiniDB (a MySQL compatible database) installs 100%, as does Visual Studio 2010, Microsoft SQL Server, etc, etc.
Your advice on how to work around this?
p.s. Here is the screen it got stuck on for 15 minutes until I killed the process:
Update 2010-12-20
Tried MySQL v5.1, it didn't work either. Its amazing - if you type "mysqld /?", or "mysqld -help", it doesn't give you any help. And, if you try to restart the service manually, it doesn't display any error messages. Could it be any more unhelpful?
Update 2010-12-21
Installed MySQL 6.0 alpha, and it worked. However, I'd rather not use an alpha release, given that the "stable" release is anything but :(
Update 2010-12-21
Found http://dev.mysql.com/doc/refman/5.1/en/windows-troubleshooting.html, dealing with troubleshooting under Windows.
Discovered that you can generate an error log if the service doesn't start - see here: http://dev.mysql.com/doc/refman/5.1/en/error-log.html
Update 2010-12-21
Aha! A clue. To actually see the error, add "--console":
mysqld --console
This returns:
101221 13:57:28 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
101221 13:57:28 InnoDB: Initializing buffer pool, size = 203.0M
101221 13:57:28 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 56623104 bytes
InnoDB: than specified in the .cnf file 0 106954752 bytes!
101221 13:57:28 [ERROR] Plugin 'InnoDB' init function returned error.
101221 13:57:28 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
101221 13:57:28 [ERROR] Unknown/unsupported storage engine: INNODB
101221 13:57:28 [ERROR] Aborting
101221 13:57:28 [Note] mysqld: Shutdown complete
Update 2010-12-21
It now installs properly. See the answer below.
Solution 1:
Here's how I fixed the problem:
Step 1: By default, its impossible to find out the reason why the service is failing to start. So, tell it to start in non-service mode, and pipe errors to the console:
mysqld --console
Step 2: In my particular case, I had to delete the contents of:
C:\ProgramData\MySQL
... then reinstall. The MySQL v5.5 installer has a bug: if you uninstall MySQL v5.5 to fix a problem with a bad installation, it fails to clean up C:\ProgramData\MySQL, meaning that it is impossible to install MySQL v5.5 on that machine, from that moment on, without deleting this rogue directory.
Hints:
- Ensure you kill any instances of "mysqld" in the process monitor.
- To remove any existing services, use "sc delete MYSQLxx".
Open letter to the MySQL development team at Oracle:
---start open letter to Oracle---
Dear MySQL dev team at Oracle:
If, when MySQL is installed, the service fails to start, please let us know why by either (a) pointing us in the direction of the error log or (b) displaying this error log.
Failure to do so casts Oracle in an incompetent light.
Yours sincerely,
Everyone that installs MySQL on Windows.
---end open letter to Oracle---
Solution 2:
I agree with Gravitas but you do not need to do a re-install (especially when installing MySQL
Server x.x in a different folder other than the default in C:/Program Files/).
These steps helped me run the service successfully.Worked in Win7 x64 so I assume x32 will be just fine :)
Open 'my.ini' file where MySQL Server x.x is installed (mine was 5.5 but 5.1 is also OK)
Go to the line where it says:
datadir=C:/ProgramData/MySQL/MySQL Server x.x/data
-> (This is the default path)
Change the above line with something like this:datadir="<Drive_Letter>:/path/where/MySQL/is/installed/MySQL Server x.x/data/"
Copy all contents of C:/ProgramData/MySQL/MySQL Server x.x/
to the newly designated datadir
EXCEPT ib_logfile0
& ib_logfile1
(relocate them elsewhere as a backup).
Delete C:/ProgramData/MySQL/MySQL Server x.x/
.
Re-run MySQLInstanceConfig
.
Check TCP/IP networking
but DO NOT change security settings (leave them unaltered).
Start service (ib_logfile(1,2)
will be regenerated).
P.S.:Reboot and clean temporary files -after reboot- with CCleaner. For some (weird?) reason, you cannot connect to MySQL DBMS from an IDE or MySQL Workbench CE x.x after applying the above settings until rebooting.
NOTE:Editing security settings will cause the configuration utility to hang due to another bug
introduced when enabling TCP/IP with any other setting(s).
Hope this helps!