CertGrid CertGrid
Concepts·MySQL

MySQL Binary Log

Every change is written to the binary log before it reaches you. That log is what makes both replication and point-in-time recovery possible - and it is on by default in MySQL 8, whether or not you planned for it.

Backup and Restore Guide 24 of 45 Intermediate

Binary logging is enabled by default from 8.0. On 5.7 it was off unless configured, which is why older documentation treats it as an opt-in.

Every command on this page ran on db-a01.
Server NameIP AddressOSRolesCPURAMHDD
db-a01192.168.0.81Ubuntu 26.04 LTSPrimary / Source / Replica Set Member 12 Core4 GB50 GB

This guide includes

Use this when you need point-in-time recovery or replication. This matters because every change is written to the binary log before it ever reaches you - and those files grow forever unless something removes them.

Before you start

  1. Confirm it is on and read its shape

  2. See the files and where the server is writing

  3. Manage retention before the disk does it for you

Official sources