Jump to content

Corruption of MySQL database


jwhite68

Recommended Posts

I have a site thats been running live for about 4 weeks.

I discovered this morning that at least 3 tables have records deleted from a particular date, from the live database - and that the application (php) itself does not have any code that can delete these records.

 

So I am either dealing with a malicious hacker who has deleted records, or a corrupt database.

My hosting provider cannot offer any help and tells me that databases get corrupted VERY often.  As if I should accept this and just get on with my life.

 

Does anyone have any experience of similar issues, or know of areas I could check to try and find the cause of this issue?

 

I dont believe that live databases get corrupted very often at all.

Link to comment
https://forums.phpfreaks.com/topic/74288-corruption-of-mysql-database/
Share on other sites

they do corrupt easily, i had 10-20 database corruptions within 24 hours, same table, but it was on MyISAM

 

if the site is accessed frequently, consider adding a SQL statement at the begining of each script

 

e.g:

<?php
$SQL = "REPAIR `table`";
$QUERY = mysql_query($SQL);
?>

 

its the only solution that worked for me

If it is MyISAM then it is prone to corruption; If you are using MyISAM then you may want to consider switching to InnoDB if you don't want to worry as much about it occurring.

 

You should read up on the different engines available through MySQL, each has it's pros and cons.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.