Skip to Content
MySQL 8 Cookbook
book

MySQL 8 Cookbook

by Karthik Appigatla
January 2018
Intermediate to advanced
446 pages
12h 57m
English
Packt Publishing
Content preview from MySQL 8 Cookbook

How to do it...

If the replication is already set up between the servers, follow these steps:

  1. Enable GTIDs in my.cnf:
shell> sudo vi /etc/my.cnf[mysqld]gtid_mode=ONenforce-gtid-consistency=trueskip_slave_start
  1. Set the master as read-only and make sure that all the slaves catch up with the master. This is very important because there should not be any data inconsistency between master and slaves:
On mastermysql> SET @@global.read_only = ON;On Slaves (if replication is already setup)mysql> SHOW SLAVE STATUS\G
  1. Restart all the slaves to put GTID into effect. Since the skip_slave_start is given in the configuration file, the slave won't start until you specify the START SLAVE command. If you start the slave, it will fail with this error— ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

MySQL Cookbook

MySQL Cookbook

Paul DuBois
Advanced MySQL 8

Advanced MySQL 8

Eric Vanier, Birju Shah, Tejaswi Malepati

Publisher Resources

ISBN: 9781788395809Other