QuestionQ113

Backup and Recovery

Examine this excerpt from the binary log file named binlog.000036:

Question Image

The rental table was accidentally dropped, and you must restore the table.

You have restored the most recent backup, which corresponds to the beginning of the binlog.000036 binary log. Which command will complete the recovery?

  • A mysqlbinlog --stop-position=500324 binlog.000036 | mysql
  • B mysqlbinlog --stop-datetime='2019-ll-20 14:55:18' binlog.000036 | mysql
  • C mysqlbinlog --stop-position=5004S3 binlog.000036 | mysql
  • D mysqlbinlog --stop-datetime='2019-ll-20 14:55:16' binlog.000036 | mysql
Explanation

The DROP TABLE rental event starts at log position 500324. Using --stop-position=500324 replays the binary-log events before that position while excluding the drop event itself, restoring the database to the state immediately before the accidental deletion.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!