Skip to content
Replication Internals: Decoding the MySQL Binary Log Part 2: File Header and Common Event Header
← Back to blogMySQL

Replication Internals: Decoding the MySQL Binary Log Part 2: File Header and Common Event Header

In this second post of our series, we examine the binary log file header and the 19-byte common event header that every event shares. The Binary Log File Header (Magic Number) Every MySQL binary log file begins with a 4-byte magic number that identifies it as a binary log: Bytes Hex ASCII Meaning 4 FE 62 69 6E .bin Unencrypted binary log 4 FD 62 69 6E .bin Encrypted binary log The first byte distinguishes encrypted (0xFD) from unencrypted (0xFE) logs. For encrypted logs, an

Marcelo Altmann

Marcelo Altmann

2026-03-04 · 5 min read

Want to see Readyset in action?

Book a demo and see how Readyset can accelerate your database.