MySQL Troubleshooting Tip of the Day
One of our EC2–hosted database servers had to be rebooted last night, and when it came back up some of our database-driven sites were working, others weren’t. Upon further investigation I found the following message cropping up in mongrel_rails and phpMyAdmin logs:
Error No. 1033 Incorrect information in file: ‘<filename>’
A peek at phpMyAdmin’s database list showed that in many of the databases, some tables showed up fine while others were marked as “in use”. Attempting to view those tables produced the above message.
After a bit of poking around I realised that the my.cnf configuration file had been overwritten by some startup script, and now contained the line skip-innodb. This meant that the server couldn’t load any tables that used the InnoDB storage engine. Removing this line from my.cnf and restarting the mysqld service fixed the problem.
Incidentally, make sure you’re editing the right my.cnf file — there were a few on our system and it took a couple of tries to figure out which one MySQL was actually using.
Thought I’d post this in case any other EC2 users run into this issue. I think the startup script in question belonged to WHM/cPanel, so this might be of interest to users of those packages too. Phew.
Comment