[root@localhost mysql]# mysqlbinlog binlog.000003 /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at4 #16011016:41:49 server id 1 end_log_pos 106Start: binlog v 4, server v 5.1.73-log created 16011016:41:49at startup # Warning: this binlog is either in use or was not closed properly. ROLLBACK/*!*/; BINLOG ' TRmSVg8BAAAAZgAAAGoAAAABAAQANS4xLjczLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAABNGZJWEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC '/*!*/; # at106 position号标记 #16011017:26:15 server id 1 end_log_pos 191 Query thread_id=3 exec_time=0 error_code=0 时间标记160110表示2016-01-10 SETTIMESTAMP=1452417975/*!*/; SET @@session.pseudo_thread_id=3/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create database xiemx 对数据库的操作记录 /*!*/; DELIMITER ; # Endof log file ROLLBACK/* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
二进制恢复命令:
1 2 3 4 5 6 7
[root @server1 mysql ] #mysqlbinlog --start-date="2015-06-18 9:55:00" --stop-date="2015-06-18 10:05:00"/var/log/mysql/binlog.000006 | mysql -uroot -p