根据上述日志分析,只要恢复从2014.01.12 20:12:14到2014.01.12 20:13:50之间的操作即可。可通过mysqlbinlog指定时间范围输出,结合管道交给msyql命令执行导入重做:
[root@dbsvr1 ~]# mysqlbinlog \
--start-datetime="2017-04-12 12:06:55" \
--stop-datetime="2017-04-12 12:07:23" \
/var/lib/mysql/mysql-bin.000002 | mysql -u root -p
Enter password: //验证口令
3)确认恢复结果
mysql> SELECT * FROM db1.tb1;
+----+--------+
| id | name |
+----+--------+
| 1 | Jack |
| 2 | Kenthy |
| 3 | Bob |
+----+--------+
3 rows in set (0.00 sec)
Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx