mysqlbinlog Hex Dump Format
The --hexdump option causes mysqlbinlog to produce a hex dump of the binary log contents:
shell> mysqlbinlog --hexdump master-bin.000001
The hex output consists of comment lines beginning with #, so the output might look like this for the preceding command:
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; # at 4 #051024 17:24:13 server id 1 end_log_pos 98 # Position Timestamp Type Master ID Size Master Pos Flags # 00000004 9d fc 5c 43 0f 01 00 00 00 5e 00 00 00 62 00 00 00 00 00 # 00000017 04 00 35 2e 30 2e 31 35 2d 64 65 62 75 67 2d 6c |..5.0.15.debug.l| # 00000027 6f 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |og..............| # 00000037 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| # 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;
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 http://forge.mysql.com/wiki/MySQL_Internals_Binary_Log.)
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. In the example shown,'0f'indicates aFORMAT_DESCRIPTION_EVENT. The following table lists the possible type codes.Type Name Meaning 00UNKNOWN_EVENTThis event should never be present in the log. 01START_EVENT_V3This indicates the start of a log file written by MariaDB 4 or earlier. 02QUERY_EVENTThe most common type of events. These contain statements executed on the master. 03STOP_EVENTIndicates that master has stopped. 04ROTATE_EVENTWritten when the master switches to a new log file. 05INTVAR_EVENTUsed for AUTO_INCREMENTvalues or when theLAST_INSERT_ID()function is used in the statement.06LOAD_EVENTUsed for LOAD DATA INFILEin MariaDB 3.23.07SLAVE_EVENTReserved for future use. 08CREATE_FILE_EVENTUsed for LOAD DATA INFILEstatements. This indicates the start of execution of such a statement. A temporary file is created on the slave. Used in MariaDB 4 only.09APPEND_BLOCK_EVENTContains data for use in a LOAD DATA INFILEstatement. The data is stored in the temporary file on the slave.0aEXEC_LOAD_EVENTUsed for LOAD DATA INFILEstatements. The contents of the temporary file is stored in the table on the slave. Used in MariaDB 4 only.0bDELETE_FILE_EVENTRollback of a LOAD DATA INFILEstatement. The temporary file should be deleted on the slave.0cNEW_LOAD_EVENTUsed for LOAD DATA INFILEin MariaDB 4 and earlier.0dRAND_EVENTUsed to send information about random values if the RAND()function is used in the statement.0eUSER_VAR_EVENTUsed to replicate user variables. 0fFORMAT_DESCRIPTION_EVENTThis indicates the start of a log file written by MariaDB 5 or later. 10XID_EVENTEvent indicating commit of an XA transaction. 11BEGIN_LOAD_QUERY_EVENTUsed for LOAD DATA INFILEstatements in MariaDB 5 and later.12EXECUTE_LOAD_QUERY_EVENTUsed for LOAD DATA INFILEstatements in MariaDB 5 and later.13TABLE_MAP_EVENTInformation about a table definition. Used in MariaDB 5.1.5 and later. 14PRE_GA_WRITE_ROWS_EVENTRow data for a single table that should be created. Used in MariaDB 5.1.5 to 5.1.17. 15PRE_GA_UPDATE_ROWS_EVENTRow data for a single table that needs to be updated. Used in MariaDB 5.1.5 to 5.1.17. 16PRE_GA_DELETE_ROWS_EVENTRow data for a single table that should be deleted. Used in MariaDB 5.1.5 to 5.1.17. 17WRITE_ROWS_EVENTRow data for a single table that should be created. Used in MariaDB 5.1.18 and later. 18UPDATE_ROWS_EVENTRow data for a single table that needs to be updated. Used in MariaDB 5.1.18 and later. 19DELETE_ROWS_EVENTRow data for a single table that should be deleted. Used in MariaDB 5.1.18 and later. 1aINCIDENT_EVENTSomething out of the ordinary happened. Added in MariaDB 5.1.18. Master ID: The server ID of the master that created the event.Size: The size in bytes of the event.Master Pos: The position of the next event in the original master log file.Flags: 16 flags. Currently, the following flags are used. The others are reserved for future use.