MySQL GTID Replication Explained | MySQL Tutorial



MySQL GTID Replication Explained | MySQL Tutorial

MySQL GTID Replication Explained | MySQL Tutorial

In this mysql gtid replication video we’ll walk you through mysql gtid replication step-by step. Well, not really step-by-step, but you will know a bunch of high-level things that make mysql gtid replication possible.

mysql gtid vs binlog replication techniques are different things, so please don’t get them confused – mysql gtid based replication means an easy failover process, and perhaps the biggest advantage of mysql gtid enable is that there’s no necessity to check from where mysql replication should begin. In MySQL binlog replication, mysql server replication must be controlled based on the position provided in the binlog file of your mysql server (check my.cnf or my.ini for this option.)

For a mysql gtid replication step-by step setup, follow these steps:
1. Make both MySQL servers read-only, stop them.
2. Enable GTIDs and configure their options (look into gtid_mode=ON and enforce-gtid-consistency=ON for this one), then restart both servers.
3. Make sure your replica uses automatic positioning using the SOURCE_AUTO_POSITION statement.
4. Take a backup, start the MySQL server replica.
5. This sql tutorial will also remind you to not forget to disable the read-only mode on both of your servers for your mysql replication to work correctly.

There also are multiple variables used to control and monitor the mysql gtid replication process. This mysql tutorial will tell you that some of them let us enable or disable GTID-based logging, some let us specify how the next GTID should be obtained, etc.

During the mysql gtid replication process, you may also face some restrictions and this sql tutorial will also tell you a little about them.

For example, mysql gtid replication may not work with non-transactional MySQL server storage engines.
Certain SQL queries or SQL statements aren’t allowed to be used within GTID-based replication until MySQL 8.0.21.
There are also certain restrictions on temporary tables when certain mysql server binlog formats are in use, etc.

Also, don’t forget that the mysql_gtid_subset option requires two options as input – that may be important for you to know as well.

Want some sql tutorial videos on sql interview questions and answers? Perhaps some mysql replication or mysql replication troubleshooting videos? Subscribe to the channel to see them and until next time.

Music:
Evening by Qlowdy https://soundcloud.com/qlowdymusic
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: https://bit.ly/3NNExs1
Music promoted by Audio Library: https://www.youtube.com/watch?v=RXx3SO4PVDI

#mysql #database #developer #sql #webdevelopment #web #dev