[root@localhost ~]# ll /data/bin/ total 8 -rw-rw---- 1 mysql mysql 328 May 6 03:31 mysql-bin.000001 -rw-rw---- 1 mysql mysql 27 May 6 03:31 mysql-bin.index
[root@localhost ~]# mysqlbinlog --start-position=8309 --stop-position=8639 /data/bin/mysql-bin.000001 -v #-v选项可以将base64编码转换为可读的信息。 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at 4 #190506 3:31:11 server id 1 end_log_pos 256 CRC32 0x0c261669 Start: binlog v 4, server v 10.2.23-MariaDB-log created 190506 3:31:11 at startup # Warning: this binlog is either in use or was not closed properly. ROLLBACK/*!*/; BINLOG ' /znPXA8BAAAA/AAAAAABAAABAAQAMTAuMi4yMy1NYXJpYURCLWxvZwAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAD/Oc9cEzgNAAgAEgAEBAQEEgAA5AAEGggAAAAICAgCAAAACgoKAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAEEwQADQgICAoKCgFpFiYM '/*!*/; # at 8309 #190506 4:11:55 server id 1 end_log_pos 8351 CRC32 0x4cbdba04 GTID 0-1-33 ddl /*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=33*//*!*/; # at 8351 #190506 4:11:55 server id 1 end_log_pos 8639 CRC32 0x8b15477f Query thread_id=12 exec_time=0 error_code=0 use `hellodb`/*!*/; SET TIMESTAMP=1557087115/*!*/; SET @@session.pseudo_thread_id=12/*!*/; SET @@session.foreign_key_checks=0, @@session.sql_auto_is_null=0, @@session.unique_checks=0, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=524288/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8 *//*!*/; SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=33/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; CREATE TABLE `toc` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `CourseID` smallint(5) unsigned DEFAULT NULL, `TID` smallint(5) unsigned DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 /*!*/; DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;