mysql user camp: gtids

129
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1 MySQL Replication: Global Transaction Identifiers(GTIDs) Shivji Kumar Jha Software Developer, MySQL Replication Team

Upload: shivji-kumar-jha

Post on 08-May-2015

466 views

Category:

Technology


1 download

DESCRIPTION

The slde contains an introduction to the global transaction identifiers(GTIDs) in MySQL Replication. The new protocol at re-connect, skipping transactions with GTIDS, replication filters, purging logs, backup/restore ets are covered here.

TRANSCRIPT

Page 1: MySQL User Camp: GTIDs

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

1

MySQL Replication:Global Transaction Identifiers(GTIDs)

Shivji Kumar JhaSoftware Developer, MySQL Replication Team

Page 2: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

2

Safe Harbour Statement

The following is intended to outline our general product direction. It is intended

for information purposes only, and may not be incorporated into any contract.

It is not a commitment to deliver any material, code, or functionality, and should

not be relied upon in making purchasing decisions. The development, release,

and timing of any features or functionality described for Oracle’s products

remains at the sole discretion of Oracle.

Page 3: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

3

Program Agenda

Introduction to MySQL Replication

Fail-over Base– Global Transaction Identifiers – Automatic Positioning – Hands-On

Under the Hood: Become a GTID Expert– How Slave Preserves GTIDs – GTIDs Must Be Unique

Integration With Other Features– Seeking & Skipping – Purging Binary Logs – Restoring from Backup

Page 4: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

4

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

What isReplication?

Page 5: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

5

Replication: Copy Changes Master → Slave

MySQL Master Server– Changes data

– Sends changes to slave

MySQL Slave Server– Receives changes from master

– Applies received changes to database

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

M S

Page 6: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

6

Replication: Copy Changes Master → SlaveIntroduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

M M/S S

S

S

S

M

Server can be master, slave or both

Master can have multiple slaves

Page 7: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

7

Replication: Copy Changes Master → SlaveIntroduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

SM

M

● Slave can only have one master

SM

MSlave can have multiple masters!labs.mysql.com

labsYippee!

Page 8: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

8

Replication: Copy Changes Master → SlaveIntroduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

M/S

● Circular replication is also possible

M/S

M/S

M/S

M/S

M/S

Page 9: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

9

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Why UseReplication?

Page 10: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

10

Why Replication? – Performance

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Read scale-out

M S

write clients read clients

Page 11: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

11

Why Replication? – Performance

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Read scale-out

M S

write clients read clients

Morereads?More

slaves!

Page 12: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

12

Why Replication? – Performance

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Read scale-out

M S

write clients read clients

Morereads?More

slaves!

S

S

S

M

read clients

write clients

Page 13: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

13

Why Replication? – Redundancy

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

If master crashes, promote slave to master

C

B

A

Page 14: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

14

Why Replication? – Redundancy

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

If master crashes, promote slave to master

C

B

ACrash

Page 15: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

15

Why Replication? – Redundancy

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

If master crashes, promote slave to master

C

B

A

B is thenew master

Page 16: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

16

Why Replication? – Online backup/reporting

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Expensive queries on slave(s)

M S

Regular clients

Reports Big queries Business intelligence

Page 17: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

17

CB

BAAC

Image fromwww.ginkgomaps.com

Why Replication? – Long-distance Data Distribution

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Page 18: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

18

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

How DoesReplication

Work?

Page 19: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

19

All Changes Written to Binary Log

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

A

binary log

Client

Page 20: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

20

All Changes Written to Binary Log

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

A

binary log

Clientcreate table t (a int);

Page 21: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

21

All Changes Written to Binary Log

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

create...

A

binary log

Client

Table t

create table t (a int);

Page 22: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

22

All Changes Written to Binary Log

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

create...

A

binary log

Client

Table t

create table t (a int);insert into t values (1);

Page 23: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

23

All Changes Written to Binary Log

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

create...insert...A

binary log

Client

Table t1

create table t (a int);insert into t values (1);

Page 24: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

24

Slave Initiates Replication

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

B

binary log

A

binary log

Client1. Slave sends request

to start replicationto master

2. Master sends streamof replication data

to slave

Page 25: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

25

Binary Log Sent to Slave, Re-executed

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

B

binary log

A

binary log

Client

Page 26: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

26

Binary Log Sent to Slave, Re-executed

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

create...

B

binary log

A

binary log

Client

Page 27: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

27

Binary Log Sent to Slave, Re-executed

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

create...

Table t

B

binary log

create...

A

binary log

Client

Page 28: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

28

Binary Log Sent to Slave, Re-executed

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

create...

Table t Table t

create...

B

binary log

create...

A

binary log

Client

Page 29: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

29

Binary Log Sent to Slave, Re-executed

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

create...insert...

Table t Table t

create...

B

binary log

create...

A

binary log

Client

Page 30: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

30

Binary Log Sent to Slave, Re-executed

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

create...insert...

Table t1

Table t

create...

B

binary log

create...insert...A

binary log

Client

Page 31: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

31

Binary Log Sent to Slave, Re-executed

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

create...insert...

Table t1

Table t1

create...insert...B

binary log

create...insert...A

binary log

Client

Page 32: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

32

Makes sense?

Page 33: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

33

Program Agenda

Introduction to MySQL Replication

Fail-over Base– Global Transaction Identifiers – Automatic Positioning – Hands-On

Under the Hood: Become a GTID Expert– How Slave Preserves GTIDs – GTIDs Must Be Unique

Integration With Other Features– Seeking & Skipping – Purging Binary Logs – Restoring from Backup

Page 34: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

34

Fail-over Crash can happen to anyone:

– Hardware failure

– Human mistake

– Bug

– Natural disaster

Automatic fail-over with Global Transaction Identifiers:– Reduces admin overhead

– Prevents planned downtime

– Prevents unplanned downtime

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Page 35: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

36

Fail-over

Handle server crash with minimal disruption Example 1: tree

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

C

B

A

Page 36: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

37

Fail-over

Handle server crash with minimal disruption Example 1: tree

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

C

B

ACrash

Page 37: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

38

Fail-over

Handle server crash with minimal disruption Example 1: tree

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

C

B

A

Page 38: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

39

Fail-over

Handle server crash with minimal disruption Example 1: tree

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

C

B

A

Make B the new master

Page 39: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

43

Fail-over

Handle server crash with minimal disruption Example 1: tree Example 2: line

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Page 40: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

44

Fail-over

Handle server crash with minimal disruption Example 1: tree Example 2: line

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

CA B

Page 41: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

45

Fail-over

Handle server crash with minimal disruption Example 1: tree Example 2: line

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

CA BCrash

Page 42: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

46

Fail-over

Handle server crash with minimal disruption Example 1: tree Example 2: line

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

CA B

Page 43: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

47

Fail-over

Handle server crash with minimal disruption Example 1: tree Example 2: line

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

CA B

Make A direct master of C

Page 44: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

53

Fail-over

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Handle server crash with minimal disruption Example 1: tree Example 2: line Example 3: circle

C

A

B

D

Page 45: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

54

Fail-over

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Handle server crash with minimal disruption Example 1: tree Example 2: line Example 3: circle

C

A

B

DCrash

Page 46: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

55

Fail-over

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Handle server crash with minimal disruption Example 1: tree Example 2: line Example 3: circle

C

A

B

D

Page 47: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

56

Fail-over

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Handle server crash with minimal disruption Example 1: tree Example 2: line Example 3: circle

C

A

B

D

Make a shortcutin the circle

Page 48: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

61

Fail-over

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Handle server crash with minimal disruption Example 1: tree Example 2: line Example 3: circle Example 4: scheduled maintenance

C

A

B

D

Takeout D!

Page 49: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

62

Fail-over

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Handle server crash with minimal disruption Example 1: tree Example 2: line Example 3: circle Example 4: scheduled maintenance

C

A

B

D

MaintainD offline,without

disruptingservice

Page 50: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

63

Fail-over

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Handle server crash with minimal disruption Example 1: tree Example 2: line Example 3: circle Example 4: scheduled maintenance

C

A

B

D

Page 51: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

64

Fail-over

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Handle server crash with minimal disruption Example 1: tree Example 2: line Example 3: circle Example 4: scheduled maintenance Example 5: arbitrary topology

A

B

C

D

E

F

Page 52: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

65

Wow!Lets

get started withfail-over.

Page 53: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

66

Program Agenda

Introduction to MySQL Replication

Fail-over Base– Global Transaction Identifiers – Automatic Positioning – Hands-On

Under the Hood: Become a GTID Expert– How Slave Preserves GTIDs – GTIDs Must Be Unique

Integration With Other Features– Seeking & Skipping – Purging Binary Logs – Restoring from Backup

Page 54: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

67

Global Transaction Identifiers

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Server assigns Global Transaction Identifier (GTID) to every transaction:

– server_uuid:numbera61678ba-4889-4279-9e58-45ba840af334:1

– server_uuid identifies the server; globally unique

– number is incremented by 1 for each transaction on this server

Writes GTID to binary log Slave ensures transaction gets the same GTID when re-executed

Page 55: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

68

Global Transaction Identifiers

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

master> CREATE TABLE t1 (a INT);

master> SELECT @@global.gtid_executed;a61678ba­4889­4279­9e58­45ba840af334:1

master> INSERT INTO t1 VALUES (1);

master> INSERT INTO t1 VALUES (2);

master> SELECT @@global.gtid_executed;a61678ba­4889­4279­9e58­45ba840af334:1­3

Note: interval

New variable:gtid_executed

Page 56: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

69

Global Transaction Identifiers

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

master> SELECT @@global.gtid_executed;a61678ba­4889­4279­9e58­45ba840af334:1­10000

 slave> SELECT @@global.gtid_executed;a61678ba­4889­4279­9e58­45ba840af334:1­9999

Slave is missingone transactionSlave is missingone transaction

Page 57: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

70

But how are GTIDs

used infail-over?

Page 58: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

71

Program Agenda

Introduction to MySQL Replication

Fail-over Base– Global Transaction Identifiers – Automatic Positioning – Hands-On

Under the Hood: Become a GTID Expert– How Slave Preserves GTIDs – GTIDs Must Be Unique

Integration With Other Features– Seeking & Skipping – Purging Binary Logs – Restoring from Backup

Page 59: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

72

Automatic Positioning

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Master–slave protocol:– Slave sends @@gtid_executed to master

– Master sends all other transactions to slave

id1,trx1,id2,trx2

id1,trx1,id2,trx2,id3,trx3

A 2. id3, trx3, …

1. id1…id2

B

Page 60: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

73

Automatic Positioning

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Example 1: tree

(master)

Aid1,trx1,id2,trx2,id3,trx3

(slave)

Cid1,trx1

(slave)

id1,trx1,id2,trx2 B

Page 61: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

74

Automatic Positioning

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Example 1: tree

(master)

Aid1,trx1,id2,trx2,id3,trx3

(slave)

Cid1,trx1

(slave)

id1,trx1,id2,trx2 B

Crash!

Page 62: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

75

Automatic Positioning

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Example 1: tree

(master)

Aid1,trx1,id2,trx2,id3,trx3

(slave)

Cid1,trx1

(slave)

id1,trx1,id2,trx2 B

Page 63: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

76

Automatic Positioning

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Example 1: tree

(master)

Aid1,trx1,id2,trx2,id3,trx3

(slave)

Cid1,trx1

(slave)

id1,trx1,id2,trx2 B id1

id2, trx2,...

What theslave has

What theslave doesnot have

Page 64: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

80

Automatic Positioning

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Example 1: tree Example 2: circle

BA C

client client

Page 65: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

81

Automatic Positioning

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Example 1: tree Example 2: circle

id1,trx1

BA C

client client trx1

Page 66: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

82

Automatic Positioning

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Example 1: tree Example 2: circle

id1,trx1

Bid2,trx2

A C

client clienttrx2 trx1

Page 67: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

83

Automatic Positioning

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Example 1: tree Example 2: circle

id1,trx1,id2,trx2 B

id2,trx2

A C

client clienttrx2 trx1

Page 68: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

84

Automatic Positioning

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Example 1: tree Example 2: circle

id1,trx1,id2,trx2,id3,trx3

Bid2,trx2

A C

client clienttrx2 trx1, trx3

Page 69: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

85

Automatic Positioning

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Example 1: tree Example 2: circle

id1,trx1,id2,trx2,id3,trx3

Bid2,trx2

A C

client clienttrx2 trx1, trx3

Crash!

Page 70: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

86

Automatic Positioning

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Example 1: tree Example 2: circle

id1,trx1,id2,trx2,id3,trx3

Bid2,trx2

A C

client clienttrx2 trx1, trx3

Page 71: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

87

Automatic Positioning

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Example 1: tree Example 2: circle

id1,trx1,id2,trx2,id3,trx3

Bid2,trx2

A C

client clienttrx2 trx1, trx3

id2

id1,trx1,id3,trx3,...What theslave has

What theslave doesnot have

Page 72: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

91

Awesome!How do I set

it up?

Page 73: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

92

Program Agenda

Introduction to MySQL Replication

Fail-over Base– Global Transaction Identifiers – Automatic Positioning – Hands-On

Under the Hood: Become a GTID Expert– How Slave Preserves GTIDs – GTIDs Must Be Unique

Integration With Other Features– Seeking & Skipping – Purging Binary Logs – Restoring from Backup

Page 74: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

93

Hands-On

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Prerequisites:– Use transactional storage engine for all tables (InnoDB)

– Don't use CREATE TABLE … SELECT

– Don't execute CREATE TEMPORARY TABLE or

– DROP TEMPORARY TABLE inside a transaction

Page 75: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

94

Hands-On

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Prepare the server for fail-over– Sync and stop all servers

– Add to every my.cnf:gtid­mode=onenforce­gtid­consistency=onlog­binlog­slave­updates

– Start all servers

– Execute:> CHANGE MASTER TO MASTER_AUTO_POSITION = 1

Page 76: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

95

Hands-On

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Perform fail-over

On the slave, simply point to the new master:> CHANGE MASTER TO MASTER_HOST = '<host>',                   MASTER_PORT = <port number>,                   MASTER_USER = '<user name>'                   MASTER_PASSWORD = 'secret';

No positions needed!

Page 77: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

96

Hands-On

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Perform fail-over

C

B

ACHANGE MASTER TOMASTER_HOST = 'B',MASTER_PORT = <B's port>,MASTER_USER = '<user name>'MASTER_PASSWORD = 'secret';

Page 78: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

97

Interesting!I want to learn

more.

Page 79: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

98

Program Agenda

Introduction to MySQL Replication

Fail-over Base– Global Transaction Identifiers – Automatic Positioning – Hands-On

Under the Hood: Become a GTID Expert– How Slave Preserves GTIDs – GTIDs Must Be Unique

Integration With Other Features– Seeking & Skipping – Purging Binary Logs – Restoring from Backup

Page 80: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

99

Under the Hood: How Slave Preserves GTIDs

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Bid1,trx1,id2,trx2 A

Slave= client

Page 81: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

100

Under the Hood: How Slave Preserves GTIDs

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Bid1,trx1,id2,trx2 A

Slave= client

SET GTID_NEXT = 'id1';trx1

Page 82: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

101

Under the Hood: How Slave Preserves GTIDs

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

id1,trx1

Bid1,trx1,id2,trx2 A

Slave= client

SET GTID_NEXT = 'id1';trx1

Page 83: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

102

Under the Hood: How Slave Preserves GTIDs

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

id1,trx1

Bid1,trx1,id2,trx2 A

Slave= client

SET GTID_NEXT = 'id1';trx1SET GTID_NEXT = 'id2';trx2

Page 84: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

103

Under the Hood: How Slave Preserves GTIDs

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

id1,trx1,id2,trx2 B

id1,trx1,id2,trx2 A

Slave= client

SET GTID_NEXT = 'id1';trx1SET GTID_NEXT = 'id2';trx2

Page 85: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

104

Under the Hood: GTID_NEXT

GTID_NEXT – session system variable

Default: “AUTOMATIC”

– → Server generates new GTID for next transaction

Slave thread sets to “UUID:NUMBER”– → Server uses specified GTID for next transaction

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Page 86: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

105

Under the Hood: GTID_NEXT

Clients can set GTID_NEXT too:

Mysqlbinlog outputs SET GTID_NEXT statements:

id1,trx1id2,trx2

set gtid_next = “id1”;trx1set gtid_next = “id2”;trx2

mysqlbinlog

binary log

id,insert

A

Client

set gtid_next=”id”;insert

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Page 87: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

106

Program Agenda

Introduction to MySQL Replication

Fail-over Base– Global Transaction Identifiers – Automatic Positioning – Hands-On

Under the Hood: Become a GTID Expert– How Slave Preserves GTIDs – GTIDs Must Be Unique

Integration With Other Features– Seeking & Skipping – Purging Binary Logs – Restoring from Backup

Page 88: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

107

Under the Hood: GTIDs Must Be Unique

Impossible to execute a GTID twice:

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

id1,trx1id1,trx2A

Page 89: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

108

Under the Hood: GTIDs Must Be Unique

Impossible to execute a GTID twice:

Try to execute a GTID second time → transaction skipped:

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

id1,trx1id1,trx2A

id1,trx1

A

Client

Page 90: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

109

Under the Hood: GTIDs Must Be Unique

Impossible to execute a GTID twice:

Try to execute a GTID second time → transaction skipped:

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

id1,trx1id1,trx2A

id1,trx1

A

Client

set gtid_next=”id1”;trx2

Page 91: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

110

Under the Hood: GTIDs Must Be Unique

Impossible to execute a GTID twice:

Try to execute a GTID second time → transaction skipped:

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

id1,trx1id1,trx2A

id1,trx1

A

Client

set gtid_next=”id1”;trx2

trx2 not executed!

Page 92: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

111

I loveGTIDs!

Is there anythingthat I should pay

attention to?

Page 93: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

112

Program Agenda

Introduction to MySQL Replication

Fail-over Base– Global Transaction Identifiers – Automatic Positioning – Hands-On

Under the Hood: Become a GTID Expert– How Slave Preserves GTIDs – GTIDs Must Be Unique

Integration With Other Features– Seeking & Skipping – Purging Binary Logs – Restoring from Backup

Page 94: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

113

Skipping a Transaction

Common use case: skip a bad transaction Transaction should be skipped forever Not enough to move replication position

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Aid1,trx1,id2,trx2,id3,trx3

id1,trx1

B

Badtransaction

Page 95: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

114

Skipping a Transaction

Common use case: skip a bad transaction Transaction should be skipped forever Not enough to move replication position

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Aid1,trx1,id2,trx2,id3,trx3

id1,trx1,id3,trx3 B

Badtransaction

Page 96: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

115

Skipping a Transaction

Common use case: skip a bad transaction Transaction should be skipped forever Not enough to move replication position

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Aid1,trx1,id2,trx2,id3,trx3

id1,trx1,id3,trx3 B

Badtransaction trx2 comes back

after reconnect

id2, trx2, …

id1,id3

Page 97: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

116

Skipping a Transaction

Common use case: skip a bad transaction Transaction should be skipped forever Not enough to move replication position

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Aid1,trx1,id2,trx2,id3,trx3

id1,trx1,id3,trx3 B

Badtransaction trx2 comes back

after reconnect

So we don'tallow seeking!

id2, trx2, …

id1,id3

Page 98: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

117

Skipping a Transaction

Recall: Try to execute a GTID second time → transaction skipped Interesting feature:

Client executes GTID before slave→ slave skips transaction

To force slave thread to skip a transaction:

slave> SET GTID_NEXT=“GTID of transaction to skip”;slave> COMMIT;

Transaction is skipped forever

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Page 99: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

118

Skipping a Transaction

How to skip atransaction forever

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Aid1,trx1,id2,trx2,id3,trx3

id1,trx1

B

Badtransaction

set gtid_next=”id2”;commit;Client

Page 100: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

119

Skipping a Transaction

How to skip atransaction forever

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Aid1,trx1,id2,trx2,id3,trx3

id1,trx1,id2, – B

Badtransaction

set gtid_next=”id2”;commit;Client

Page 101: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

120

Skipping a Transaction

How to skip atransaction forever

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Aid1,trx1,id2,trx2,id3,trx3

id1,trx1,id2, – ,id3,trx3

B

Badtransaction

set gtid_next=”id2”;commit;Client

Page 102: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

121

Skipping a Transaction

How to skip atransaction forever

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Aid1,trx1,id2,trx2,id3,trx3

id1,trx1,id2, – ,id3,trx3

B

Badtransaction

set gtid_next=”id2”;commit;Client

id4, trx4, …

id1,id2,id3

Page 103: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

122

Filters

--replicate-ignore-table etc Transactions should be filtered-out forever Slave commits empty transaction

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

A

(crashed)(master)

Aid1,trx1,id2,trx2,id3,trx3

(slave)

id1,trx1,id2,-

id3,trx3B

Filters outtrx2

Logs id2 with anempty transaction

Page 104: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

123

Skipping Stuff: Summary & Recipe

To seek forward from position A to B:– Commit empty transaction for each GTID between A and B

To seek backward:– Not possible, does not make sense

To skip N transactions:– Get the GTIDs, commit empty transaction for each GTID

Replication filters automatically commit empty transactions

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Page 105: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

124

So the ruleis easy:

skip = emptytransaction

Page 106: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

125

Program Agenda

Introduction to MySQL Replication

Fail-over Base– Global Transaction Identifiers – Automatic Positioning – Hands-On

Under the Hood: Become a GTID Expert– How Slave Preserves GTIDs – GTIDs Must Be Unique

Integration With Other Features– Seeking & Skipping – Purging Binary Logs – Restoring from Backup

Page 107: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

126

Purging Binary Logs

Binary logs are rotated and can be purged

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Aid4,trx4,id5,trx5,id6,trx6

master-bin.02 master-bin.03

id7,trx7,id8,trx8

master-bin.01

id1,trx1,id2,trx2,id3,trx3

Page 108: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

127

Purging Binary Logs

Binary logs are rotated and can be purged

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Aid4,trx4,id5,trx5,id6,trx6

master-bin.02 master-bin.03

id7,trx7,id8,trx8

Client PURGE BINARY LOGS TO 'master­bin.02'

master-bin.01

id1,trx1,id2,trx2,id3,trx3

Page 109: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

128

Purging Binary Logs

Binary logs are rotated and can be purged

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Aid4,trx4,id5,trx5,id6,trx6

master-bin.02 master-bin.03

id7,trx7,id8,trx8 XPurged!

Client PURGE BINARY LOGS TO 'master­bin.02'

master-bin.01

Page 110: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

129

Purging Binary Logs

On Master: cannot send purged GTIDs to slave

– @@gtid_purged = all purged GTIDs

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Page 111: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

130

Purging Binary Logs

On Master: cannot send purged GTIDs to slave

– @@gtid_purged = all purged GTIDs

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

B Purged!Aid4,trx4,id5,trx5,id6,trx6

master-bin.02

XPurged!id1,trx1,id2,trx2

slave-bin.01

gtid_purged=id1,id2,id3 gtid_executed=id1,id2

master-bin.01

Page 112: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

131

Purging Binary Logs

On Master: cannot send purged GTIDs to slave

– @@gtid_purged = all purged GTIDs

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

B Purged!Aid4,trx4,id5,trx5,id6,trx6

master-bin.02

XPurged!id1,trx1,id2,trx2

slave-bin.01

Error!

id1,id2

Nothing sensible to do:B needs trx3

which is purgedgtid_purged=id1,id2,id3 gtid_executed=id1,id2

master-bin.01

Page 113: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

132

Purging Binary Logs

On Slave: must send all GTIDs (purged or not) to master

– @@gtid_executed = all GTIDs (purged or not)

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

A

slave-bin.02

XPurged!A

master-bin.02

id1,trx1,id2,trx2,id3,trx3

id4,trx4,id5,trx5

id4,trx4

slave-bin.01master-bin.01

id5,trx5

id1…id4

Note: slave must send id1...id3 despite purgedor else master would send trx1…trx3

Page 114: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

133

Purging Binary Logs

On Master: cannot send purged GTIDs to slave

– @@gtid_purged = all purged GTIDs

On Slave: must send all GTIDs (purged or not) to master

– @@gtid_executed = all GTIDs (purged or not)

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Aid4,trx4,id5,trx5,id6,trx6

master-bin.02 master-bin.03

id7,trx7,id8,trx8 XPurged!

@@gtid_purged = id1 … id3 @@gtid_executed = id1 … id8

master-bin.01

Page 115: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

134

Purged and Executed are Stored in Binary Log

Binary logs begin with:

[ list of all GTIDs in all previous binary logs ]

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

A

[id1…id3]id4,trx4,id5,trx5,id6,trx6

master-bin.02 master-bin.03

[id1…id6]id7,trx7,id8,trx8 XPurged!

master-bin.01

GTIDs inmaster-bin.01 +master-bin.02

GTIDs inmaster-bin.01

Page 116: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

135

Purged and Executed are Stored in Binary Log

Binary logs begin with:

[ list of all GTIDs in all previous binary logs ]

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

A

[id1…id3]id4,trx4,id5,trx5,id6,trx6

master-bin.02 master-bin.03

[id1…id6]id7,trx7,id8,trx8 XPurged!

@@gtid_executed=

head of newest log +GTIDs in newest logid1…id3

id1…id6 + id7 + id8

master-bin.01

@@gtid_purged=

head of oldest log

Page 117: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

136

Purging Binary Logs: Summary

Works automatically, behind the scenes

Purged GTIDs are stored in @@gtid_purged @@gtid_purged is a subset of @@gtid_executed

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Page 118: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

137

Automaticis the word!Does purging haveanything to do with

backups?

Page 119: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

138

Program Agenda

Introduction to MySQL Replication

Fail-over Base– Global Transaction Identifiers – Automatic Positioning – Hands-On

Under the Hood: Become a GTID Expert– How Slave Preserves GTIDs – GTIDs Must Be Unique

Integration With Other Features– Seeking & Skipping – Purging Binary Logs – Restoring from Backup

Page 120: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

139

Provision a Slave From a Backup

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

id1,create,id2,insert A

Table t1

B

Page 121: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

140

Provision a Slave From a Backup

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

id1,create,id2,insert A

Table t1

B

Backup

Table t1

Backup

Page 122: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

141

Provision a Slave From a Backup

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

id1,create,id2,insert A

Table t1

B

Table t1 Backup

Table t1

Backup Restore

Page 123: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

142

Provision a Slave From a Backup

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

id1,create,id2,insert A

Table t1

B

Table t1 Backup

Table t1

Backup Restore

Binary lognot

restored!

Page 124: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

143

Provision a Slave From a Backup

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

id1,create,id2,insert A

Table t1

B

Table t1 Backup

Table t1

Backup Restore

Binary lognot

restored!

Set gtid_executed andgtid_purged to id1,id2

(or else A would sendid1,id2 when B connects)

Page 125: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

144

Provision a Slave From a Backup

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

id1,create,id2,insert A

Table t1

B

Table t1 Backup

Table t1

Backup Restore

Binary lognot

restored!

Set gtid_executed andgtid_purged to id1,id2

(or else A would sendid1,id2 when B connects)

XPurged!

set @@gtid_purged = “id1,id2”

Page 126: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

145

Provision a Slave From a Backup @@gtid_executed must agree with database state

– @@gtid_executed after restore = @@gtid_executed at backup

@@gtid_purged = GTIDs in @@gtid_executed that are not in log– Binary logs not (normally) restored

– @@gtid_purged after restore = @@gtid_executed after restore

@@gtid_purged is settable:

– SET @@GLOBAL.GTID_PURGED = "GTID_EXECUTED at backup"– Also sets @@GTID_EXECUTED to the same value

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Page 127: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

146

Restore a Backup

Backup tools must store @@gtid_executed Restore tools must execute:

– SET @@GLOBAL.GTID_PURGED =    "GTID_EXECUTED at backup"

Introduction to MySQL Replication Fail-over Base Under the Hood Integration With Other Features

Page 128: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

147

You hadme at “GTID”

What shall Ido now?

Page 129: MySQL User Camp: GTIDs

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

148

Next Steps

More on GTIDs– svenmysql.blogspot.co.uk

More on MySQL 5.6 Replication– http://dev.mysql.com/tech-resources/articles/

mysql-5.6-replication.html

Try Out MySQL 5.6– http://dev.mysql.com/downloads/mysql/