0

For the past two nights my 'articles' table has mysteriously cleared, erasing valuable data. The fact that the id auto-increment has not been reset suggests that it has been emptied or DELETED FROM, but I nothing in my code base fits the bill. I have checked my ec2 server for cron jobs and there are none. I have also checked phpmyadmin for routines and events and there are none of those either.

So far there are two suspicious facts which may lead to an answer:

  1. the size of the emptied table is far larger than it should be (208KiB). It is as if all of the data that disappeared over the last few days is still there.
  2. Searching around phpMyAdmin I found that there was a query into the query prompt: SELECT * FROM articles WHERE 1; It had "do not overwrite this query from outside this window" selected as well as "show this query here again". It just so happens that my articles table is what was being deleted. Could this be the source of my problem?
HoldOffHunger
  • 18,769
  • 10
  • 104
  • 133
Theramax
  • 195
  • 1
  • 13

1 Answers1

0

If you can activate the general query log (http://dev.mysql.com/doc/refman/5.1/en/query-log.html), you'll be able to see what's happening and when. You'll see the statement emptying your table, but then you'll have to figure out where it comes from.

Marc Delisle
  • 8,879
  • 3
  • 29
  • 29
  • Thanks for the answer. It seems that since clearing the SELECT code which was stored in my query box that the table emptying has ceased. Still, I'll activate the query log to help in future troubleshooting. cheers. – Theramax Dec 07 '13 at 19:36