O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required