從日誌中導出時間段內全部的bin log 操做mysql
mysqlbinlog --no-defaults --start-datetime='2014-06-16 10:00:00' --stop-datetime='2014-06-16 12:00:00' -v --base64-output=decode-rows -vv mysql-log-bin.000073 >>/tmp/recovery.log
查找須要恢復的數據庫:sql
grep -A2 -B1 "53201f60c7d90" /tmp/recovery.log >>/tmp/recovery1.sql
恢復:shell
mysql 53201f60c7d90 < /tmp/recovery1.sql