CertGrid CertGrid
Hands-on Lab·MySQL

MySQL Logical Backups with mysqldump

A dump is a text file of SQL statements that rebuilds the database. `--single-transaction` is the flag that makes it consistent without locking anyone out, and it is the one most people leave off.

Backup and Restore Guide 21 of 45 Beginner

Written against the versions above. `--single-transaction` gives a consistent snapshot for InnoDB tables only. A schema mixing InnoDB and MyISAM cannot be dumped consistently without locking.

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

Before you start

  1. Take the dump

  2. Look at what a dump actually is

  3. Confirm it contains both structure and data

Official sources