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

mysqldump or mysqlpump

The binary log information is stored in the SQL file as the CHANGE MASTER TO command based on the options you passed to mysqldump/mysqlpump.

  1. If you have used --master-data, you should use the binary logs of the slave:
shell> head -30 /backups/dump.sql-- MySQL dump 10.13  Distrib 8.0.3-rc, for Linux (x86_64)---- Host: localhost    Database: -- -------------------------------------------------------- Server version 8.0.3-rc-log/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;/*!40101 SET NAMES utf8 */;/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;/*!40103 SET TIME_ZONE='+00:00' ...

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