I have a problem with small (it's Raspberry Pi) mySQL installation. The point is that it's almost sure the InnoDB system files will be corrupted/damaged after system (Debian Linux like) reboot or halt.
Logs show that InnoDB engine was shotdown properly but mySQL does not start after that because of damaged InnoDB files.
Just to explain, Raspberry Pi is a small computer running Debian like Linux. File system is SD card based.
Hardware is small but I use it to collect some real world sensors data, it's not so unusual to have dozen of thousands rows in the main table.
I asked the question on the RPi forum but it seems I need some more experienced mySQL people to solve it :)
I did two things and it appears to have helped:
made sure the debian-sys-maint user was still there so the server actually shut down:
then, added a
sync
in the /etc/init.d/mysql script in thestop
case just before the;
I had the problem even after a complete reimage (due to power failure corrupting the filesystem) and it's behaving itself especially with the 'sync'. (shouldn't need to do that, but hey it helps)