Administration-Related Issues
What to Do if MySQL Keeps Crashing
All MySQL versions are tested on many platforms before they are released. This doesn’t mean that there aren’t any bugs in MySQL, but it means if there are bugs, there are very few and they can be hard to find. If you have a problem, it will always help if you try to find out exactly what crashes your system, as you will have a much better chance of getting this fixed quickly.
First, you should try to find out whether the problem is that the
mysqld daemon dies or whether your problem has to do with your
client. You can check how long your mysqld server has been up by
executing mysqladmin version. If mysqld has died, you may
find the reason for this in the file
mysql-data-directory/`hostname`.err. See Section 4.9.1.
Many crashes of MySQL are caused by corrupted index/data files. MySQL will update the data on disk, with the write( ) system call, after every SQL statement and before the client is notified about the result. (This is not true if you are running with delay_key_write, in which case only the data is written.) This means that the data is safe even if mysqld crashes, as the OS will ensure that the not-flushed data is written to disk. You can force MySQL to sync everything to disk after every SQL command by starting mysqld with --flush.
This means that normally you shouldn’t get corrupted tables unless:
Someone/something killed mysqld or the machine in the middle of an update.
You have found a bug in mysqld that caused ...