Book Image

MariaDB High Performance

By : Pierre Mavro
Book Image

MariaDB High Performance

By: Pierre Mavro

Overview of this book

Table of Contents (18 chapters)
MariaDB High Performance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Migrating from classical to GTID replication


There is no planned deprecation for the classical replication and both can be used in multiple slave replication solutions. However, it's strongly recommended to switch from classical to GTID replication to get better stability and less maintenance. To switch from the classical to the GTID, it's simple. Let's take the slave1 node to do it. First of all, we'll need to stop the slave, performing a change in the master position to take GTID instead and switch back on the server. It's as easy as that.

So, let's look at the current status of the slave:

MariaDB [(none)]> show slave status\G;
[...]
                   Using_Gtid: No
                  Gtid_IO_Pos:
1 row in set (0.00 sec)

Stop the slave and get the current GTID value on itself as the master. Send it even if it's not in GTID:

MariaDB [(none)]> stop slave;
MariaDB [(none)]> select @@gtid_slave_pos;
+------------------+
| @@gtid_slave_pos |
+------------------+
| 0-1-2162         ...