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
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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.