How to do it...

To display the contents of server1.000001, execute the following:

shell> sudo mysqlbinlog /data/mysql/binlogs/server1.000001

You will get output similar to the following:

# at 226#170815 12:49:24 server id 200  end_log_pos 312 CRC32 0x9197bf88  Query thread_id=5 exec_time=0 error_code=0BINLOG '~~

In the first line, the number following # at indicates the starting position (file offset) of the event in the binary log file. The second line contains the timestamp at which the statement started on the server. The timestamp is followed by server id, end_log_pos, thread_id, exec_time, and error_code.

  • server id: Is the server_id value of the server where the event originated (200 in this case).
  • end_log_pos: Is the start position ...

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.