mysqlbinlog — Utility for Processing Binary Log Files # 00000047 00 00 00 00 9d fc 5c 43 13 38 0d 00 08 00 12 00 |.......C.8......| # 00000057 04 04 04 04 12 00 00 4b 00 04 1a |.......K...| # Start: binlog v 4, server v 5.0.15-debug-log created 051024 17:24:13 # at startup ROLLBACK; CREATE TABLE t ( id INT NOT NULL, name VARCHAR(20) NOT NULL, date DATE NULL ) ENGINE = InnoDB; START TRANSACTION; INSERT INTO t VALUES(1, ’apple’, NULL); UPDATE t SET name = ’pear’, date = ’2009-01-01’ WHERE id = 1; DELETE FROM t WHERE id = 1; COMMIT; shell>  mysqlbinlog  log_file ... # at 218 #080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F BINLOG ’ fAS3SBMBAAAALAAAANoAAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ= fAS3SBcBAAAAKAAAAAIBAAAQABEAAAAAAAEAA//8AQAAAAVhcHBsZQ== ’/*!*/; ... # at 302 #080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F Hex dump output currently contains the elements in the following list. This format is subject to change. For more information about binary log format, see MySQL Internals: The Binary Log. The following examples illustrate how  mysqlbinlog  displays row events that specify data modifications. These correspond to events with the  WRITE_ROWS_EVENT ,  UPDATE_ROWS_EVENT , and DELETE_ROWS_EVENT  type codes. The  --base64-output=DECODE-ROWS  and  --verbose  options may be used to affect row event output. Suppose that the server is using row-based binary logging and that you execute the following sequence of statements: • Position : The byte position within the log file. • Timestamp : The event timestamp. In the example shown,  ’9d fc 5c 43’  is the representation of ’051024 17:24:13’  in hexadecimal. • Type : The event type code. • Master ID : The server ID of the replication source server that created the event. • Size : The size in bytes of the event. • Master Pos : The position of the next event in the original source’s binary log file. • Flags : Event flag values. 4.6.9.2 mysqlbinlog Row Event Display By default,  mysqlbinlog  displays row events encoded as base-64 strings using  BINLOG  statements. Omitting extraneous lines, the output for the row events produced by the preceding statement sequence looks like this: 618