[摘要]mysql -uroot -p111111 test;3、还原bin-log日志中指定位置的数据通过 position位置还原数据BEGIN/*!*/;# at 175#170206 22:55:4...
mysql -uroot -p111111 test;
3、还原bin-log日志中指定位置的数据
通过 position位置还原数据
BEGIN
/*!*/;
# at 175
#170206 22:55:48 server id 1 end_log_pos 263 Query thread_id=17 exec_time=0 error_code=0
use `test`/*!*/;
SET TIMESTAMP=1486392948/*!*/;
insert into t1 values(10)
/*!*/;
# at 263
#170206 22:55:48 server id 1 end_log_pos 290 Xid = 178
COMMIT/*!*/;
# at 290
#170206 22:55:54 server id 1 end_log_pos 358 Query thread_id=17 exec_time=0 error_code=0
SET TIMESTAMP=1486392954/*!*/;
BEGIN
/*!*/;
# at 358
#170206 22:55:54 server id 1 end_log_pos 446 Query thread_id=17 exec_time=0 error_code=0
SET TIMESTAMP=1486392954/*!*/;
insert into t1 values(12)
/*!*/;
# at 446
#170206 22:55:54 server id 1 end_log_pos 473 Xid = 179
COMMIT/*!*/;
# at 473
#170206 22:56:42 server id 1 end_log_pos 547 Query thread_id=17 exec_time=0 error_code=0
SET TIMESTAMP=1486393002/*!*/;
truncate t1
还原该bin-log日志中position 位置在 172,473 中的数据(end_log_pos)
[root@localhost mysql]# mysqlbinlog --no-defaults mysql-bin.000002 --start-position="175" --stop-position="473"
关键词:详细说明mysql之数据备份与恢复