From looking at all of the various 'solutions' out there, it doesn't actually seem that any of them are correct. Don't get me wrong, I'm sure there is one somewhere but I didn't manage to find it past page two of Google so I thought I would give it a go myself. Just to save you some time, the following doesn't work despite what a lot of people will have you believe (and if they do, then you have been lucky):
- Removing the service and reinstalling;
- Removing and recreating the log files;
- Repairing the install;
- Recreating your MySQL instance;
So, in essence you will actually need to do most of your preparation that you would normally do for an upgrade. You might as well download the latest version of MySQL while you do this so firstly go and grab that. Next, do your normal backup of your databases and also your my.ini from wherever you normally keep it. Stop your MySQL service and then uninstall your MySQL installation. Go to your ProgramData folder and remove your MySQL folder, and do the same in your Program Files\MySQL folder (remove your server folder just in case you have your tools or workbench installed in there). Now go to your Users folder and have a look through there and it will normally be hidden in your Default\AppData folder. Launch regedit and search for 'mysql' and remove any instance of it that is related to your server install. Restart your server now.
When your server comes back on, run your nice new installer, giving it the same settings that you had before. Set a new instance up (it can be the same service name if you like) and then it will go off and set your my.ini, your service and your security settings. Your service should now be running straight away. Just to check it though, stop the service and start it again. You should find that it's running without erroring. If it does error, not to worry, open a command prompt and browse to your bin folder inside your new installation and run the following:
mysqld -remove MySQLWhere MySQL is the name of your service that you specified. Assuming that you have typed that in correctly it will say that it has removed the MySQL service. Now run the instance configuration wizard again (inside your bin folder) and go through it again.
Lastly, restore your databases and users / permissions and you should be done. Sorry that this is a bit lengthy but this worked for me and every other solution that I found didn't sort my problem. It seems that this error goes way, way back to MySQL 4.x but nobody has worked out a way to fix this properly. As I mentioned before, other people have posted their solutions which may have worked for them, but that could mean that this is an inconsistent error which is why it hasn't been fixed as of yet.