mysqlbinlog中解释事件--hexdump(一)

2014-11-24 15:43:40 · 作者: · 浏览: 2
mysqlbinlog中解释事件--hexdump
在binlog文件中有时候打印出来的标准时间并不足以确定一个问题,有时候会出现一个一些特殊的数字代表,无法具体理解其具体数字细节代表的意义;为处理类似的情况,可以通过使用--hexdump来打印出相关的事件的详情;
以下是案例如:
[ html]
[root@Slave02 data]# mysqlbinlog --hexdump /usr/local/mysql/data/mysql-bin.000011
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#130401 9:38:04 server id 11 end_log_pos 107
# Position Timestamp Type Master ID Size Master Pos Flags
# 00000004 fc e4 58 51 0f 0b 00 00 00 67 00 00 00 6b 00 00 00 01 00
# 00000017 04 00 35 2e 35 2e 31 33 2d 6c 6f 67 00 00 00 00 |..5.5.13.log....|
# 00000027 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
# 00000037 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
# 00000047 00 00 00 00 fc e4 58 51 13 38 0d 00 08 00 12 00 |......XQ.8......|
# 00000057 04 04 04 04 12 00 00 54 00 04 1a 08 00 00 00 08 |.......T........|
# 00000067 08 08 02 00 |....|
# Start: binlog v 4, server v 5.5.13-log created 130401 9:38:04 at startup
# Warning: this binlog was not closed properly. Most probably mysqld crashed writing it.
ROLLBACK/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
[root@Slave02 data]# mysqlbinlog --hexdump /usr/local/mysql/data/mysql-bin.0000
12
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#130402 9:28:54 server id 11 end_log_pos 107
# Position Timestamp Type Master ID Size Master Pos Flags
# 00000004 56 34 5a 51 0f 0b 00 00 00 67 00 00 00 6b 00 00 00 01 00
# 00000017 04 00 35 2e 35 2e 31 33 2d 6c 6f 67 00 00 00 00 |..5.5.13.log....|
# 00000027 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
# 00000037 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
# 00000047 00 00 00 00 56 34 5a 51 13 38 0d 00 08 00 12 00 |....V4ZQ.8......|
# 00000057 04 04 04 04 12 00 00 54 00 04 1a 08 00 00 00 08 |.......T........|
# 00000067 08 08 02 00 |....|
# Start: binlog v 4, server v 5.5.13-log created 130402 9:28:54 at startup
# Warning: this binlog was not closed properly. Most probably mysqld crashed writing it.
ROLLBACK/*!*/;
# at 107
#130402 15:45:51 server id 11 end_log_pos 367
# Position Timestamp Type Master ID Size Master Pos Flags
# 0000006b af 8c 5a 51 02 0b 00 00 00 04 01 00 00 6f 01 00 00 00 00
# 0000007e 01 00 00 00 00 00 00 00 04 00 00 1a 00 00 00 00 |................|
# 0000008e 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std|
# 0000009e 04 21 00 21 00 21 00 74 65 73 74 00 63 72 65 61 |.......test.crea|
# 000000ae 74 65 20 74 61 62 6c 65 20 69 74 65 6d 73 28 0a |te.table.items..|
# 000000be 69 64 20 69 6e 74 20 6e 6f 74 20 6e 75 6c 6c 20 |id.int.not.null.|
# 000000ce 61 75 74 6f 5f 69 6e 63 72 65 6d 65 6e 74 20 70 |auto.increment.p|
# 000000de 72 69 6d 61 72 79 20 6b 65 79 2c 0a 73 68 6f 72 |rimary.key..shor|
# 000000ee 74 5f 64 65 73 63 72 69 70 74 69 6f 6e 20 76 61 |t.description.va|
# 000000fe 72 63 68 61 72 28 32 35 35 29 2c 0a 64 65 73 63 |rchar.255...desc|
# 0000010e 72 69 70 74 69 6f 6e 20 74 65 78 74 2c 0a 65 78 |ription.text..ex|
# 0000011e 61 6d 70 6c 6