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:
- 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.
- 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?