Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying MariaDB Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
MariaDB Cookbook

MariaDB Cookbook

By : Daniel Bartholomew
4.2 (9)
close
close
MariaDB Cookbook

MariaDB Cookbook

4.2 (9)
By: Daniel Bartholomew

Overview of this book

Table of Contents (20 chapters)
close
close
MariaDB Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using global transaction IDs


Global Transaction ID (GTID) is a new feature in MariaDB 10.0 and above. It helps us achieve greater reliability and flexibility with our replication.

Getting ready

This recipe builds upon the previous one, so to get ready for this recipe, simply set up a basic replication as described in the Setting up replication recipe.

How to do it...

  1. On both our replication slave servers, launch the mysql command-line client and run the following commands:

    STOP SLAVE;
    CHANGE MASTER TO MASTER_USE_GTID = SLAVE_POS;
    START SLAVE;
    
  2. Check on the status of our replication slave servers with the following command:

    SHOW ALL SLAVES STATUS\G
    
  3. Look at the bottom of the output for the following lines (the Gtid_Slave_Pos value will likely be different and the lines are separated by several other lines in the output):

    Using_Gtid: Slave_Pos
    Gtid_Slave_Pos: 0-101-2320
    
  4. Insert more data into our temp.doctors table on the replication master server, and then run the following SELECT statement on...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY