Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Almost after each server crash, few last database records are deleted. How could I fix or workaround this? My distro is Ubuntu Server 9.10 and database MySql 5.1.37

share|improve this question
Details please. We can't answer in a vacuum, although it sounds like a simple case of the logs not being flushed and thereby losing the uncommitted data. Of course the best solution is to fix whatever is causing your server to crash. They're not supposed to do that. – John Gardeniers Jan 30 '10 at 21:13

You may want to change the type of Storage Engine you are using. Typically the default MyISAM engine works great for indexing while the InnoDB works great for foreign key constraints. These constraints can help you remove data from multiple tables when your initial query only appears to run against a single table. It almost sounds like you were running a transaction using a InnoDB Engine. Choose your database and then run the following to find out:


You should be able to recover you records if you log them some where. Logging certainly puts a load on your system but if they exist you'll probably find them here (you should log while your building out anyway):


You can change your settings here:


Don't forget to reboot after making changes. If you don't have logs try crashing your system intentionally after you do start logging. You may see a similar transaction occur during your intentional crash that will give you some more clues.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.