Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

something happened and our staging db has removed many tables, need to know what happened and when. we are using MySQL audit table doesn't seem to record anything

share|improve this question
add comment

2 Answers 2

The MySQL binary log will record all queries that affect any rows - but will only do you any good if it's enabled.

Look for a log-bin setting in your my.cnf.

share|improve this answer
    
it is enabled, how can we read it? –  learner Aug 31 '11 at 0:55
    
@learner If no path is specified in the option's configuration, then the files should be in the data location, probably /var/lib/mysql. –  Shane Madden Aug 31 '11 at 1:02
add comment

If binary log is enabled, it can be read with mysqlbinlog:

shell> mysqlbinlog /var/lib/mysql/mysqld-bin.000084
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.