Dumping master binary coordinates

Backups are always taken on slaves. To get the binary log coordinates of the master when the backup was taken, you can use the --dump-slave option. If you are taking the binary log backup from the master, use this option. Otherwise, use the --master-data option:

shell> mysqldump --all-databases --routines --events --single-transaction --dump-slave > dump.sql

The output will be like this:

---- Position to start replication or point-in-time recovery from (the master of this slave)--CHANGE MASTER TO MASTER_LOG_FILE='centos7-bin.000001', MASTER_LOG_POS=463;

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.