Tuesday, March 2, 2010

Could not start the MySQL service: Error 1067

I had to reinstall MySQL 5.1 - but once I did that, I could not start the service with the 1067 error. The problem was that the earlier install was writing the data to C:\MySQL InnoDB Datafiles\ and the new version was writing to C:\ProgramData\MySQL\MySQL Server 5.1\data

So I:
1. backed up my C:\ProgramData\MySQL\MySQL Server 5.1\data then deleted it
2. Reinstalled MySQL and started the service - this time the service started and it created a new C:\ProgramData\MySQL\MySQL Server 5.1\data
3. Stopped the service
4. I copied all my database folders from backup to this new \data directory
5. COpied the ibdata1 from C:\MySQL InnoDB Datafiles\ to this new \data (overwritng the existing file)
6. Restarted service