jwhite68 Posted October 22, 2007 Share Posted October 22, 2007 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. Quote Link to comment Share on other sites More sharing options...
lewis987 Posted October 22, 2007 Share Posted October 22, 2007 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 Quote Link to comment Share on other sites More sharing options...
jwhite68 Posted October 22, 2007 Author Share Posted October 22, 2007 Do you have any idea how / why this happened in your case? I dont see how this can happen for such a widely used database like MySQL. Quote Link to comment Share on other sites More sharing options...
derwert Posted October 23, 2007 Share Posted October 23, 2007 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.