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

How to do it...

  1. Create a replication user on the server. Create a strong password:
mysql> GRANT REPLICATION SLAVE ON *.* TO 'binlog_user'@'%' IDENTIFIED BY 'binlog_pass';Query OK, 0 rows affected, 1 warning (0.03 sec)
  1. Check the binary logs on the server:
mysql> SHOW BINARY LOGS;+----------------+-----------+| Log_name       | File_size |+----------------+-----------+| server1.000008 |      2451 || server1.000009 |       199 || server1.000010 |      1120 || server1.000011 |       471 || server1.000012 |       154 |+----------------+-----------+5 rows in set (0.00 sec)

You can find the first binary log available on the server; from this, you can start the backup. In this case, it is server1.000008.

  1. Log in to the backup server and execute the following command. This ...

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