Questions tagged [gtid]

A global transaction identifier (GTID) is a unique identifier created and associated with each transaction committed on the server of origin (master). This identifier is unique not only to the server on which it originated, but is unique across all servers in a given replication setup. There is a 1-to-1 mapping between all transactions and all GTIDs.

More information: GTID Concepts

41 questions
29
votes
4 answers

MySQL GTID consistency violation

I am trying to create a table from a select statement, and it give me a GTID consistency violation. [HY000][1786] Statement violates GTID consistency: CREATE TABLE ... SELECT. create TABLE tags_mentions as select t.*, st.ts, m.user_id_from,…
Jiho Noh
  • 479
  • 1
  • 5
  • 11
9
votes
4 answers

Q: How to set --set-gtid-purged=OFF as a default Export parameter in Mysql workbench?

Ive recently been playing with Mysql Workbench and the Export function has one little annoying feature that is not needed (by me of course). The set-gtid-purged function is set to AUTO by default in the GUI and it seems everytime you want to export…
b0uncyfr0
  • 177
  • 2
  • 2
  • 10
7
votes
2 answers

Why is MySQL `gtid_owned` session variable always empty after committing a transaction?

I'm testing some work with MySQL Global Transaction IDs (GTIDs) and I'm having a hard time getting the most-recent session GTID. I've enabled GTIDs (global gtid_mode is set to ON_PERMISSIVE). According to the documentation for gtid_owned: This…
Nick Williams
  • 2,864
  • 5
  • 29
  • 43
6
votes
2 answers

MySQL error 1236 When using GTID

I want to create a replica to my Percona Server with GTID enabled, but got this error when i show slave status: Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'The slave is connecting using CHANGE MASTER TO…
The Georgia
  • 1,005
  • 7
  • 23
  • 59
4
votes
2 answers

Anonymous transactions get made even with GTID_MODE=ON

I'm using MySQL 5.7 with GTID master-master replication and I'm experiencing a strange error. Randomly one of my masters will stop replicating with: "Cannot replicate anonymous transaction when @@GLOBAL.GTID_MODE = ON" When I check there is indeed…
Nick
  • 594
  • 2
  • 7
  • 18
4
votes
0 answers

Import MySQL data failed with error 1839

I have master slave setup of MySQL with GTID configured. I took back data backup of master and importing it to individual Test server. It is failing to import as ERROR 1839 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when…
JAVAC
  • 1,230
  • 3
  • 17
  • 38
3
votes
0 answers

How to fix out-of-order sequence number with existing GTID error

I am attaching a database to a master and after a while, I get the following error when I run show slave status, I get the following error: An attempt was made to binlog GTID 1-XXX-XXXXXXXXX which would create an out-of-order sequence number with…
Finlay Weber
  • 2,989
  • 3
  • 17
  • 37
3
votes
1 answer

GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed outside transactional context

My Magento version is 2.2.3. We are using a Google Cloud SQL 2nd gen instance. Facing error while run indexing command General error: 1787 Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed…
Prashant Valanda
  • 480
  • 8
  • 19
3
votes
1 answer

Why MySQL GTID not support temporary tables

I read from MySQL documentation CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE statements are not supported inside transactions when using GTIDs (that is, when the server was started with the --enforce-gtid-consistency option). It is possible to…
Skywalker
  • 31
  • 2
3
votes
1 answer

Deadlock on MTS replication

Situation: we have a master-master-replication using GTIDs on Percona MySQL 5.6.32-78.1. On server, there are about 10 databases and we've set slave_parallel_workers=5. One server is used for frontend handling and one for backend. Two or three times…
rabudde
  • 7,498
  • 6
  • 53
  • 91
3
votes
3 answers

Mysql slave gets ruined after a restart

Please help! I set up a master-slave replication based on the GTID mechanism. The replication works OK, until a mysqld restart happens on slave. Then the mess begins... After such a restart, I can not restore the replication. When issuing a "START…
Nadav
  • 963
  • 1
  • 8
  • 10
2
votes
2 answers

How to completely disable GTID in mysql 5.7?

As my mysql database is just used with a small web app, I won't ever need any replication features. While monitoring, I noticed something named thread/sql/compress_gtid_table. And while dumping some tables with mysqldump I got this warning: Warning:…
smknstd
  • 341
  • 1
  • 3
  • 6
2
votes
1 answer

Set up GTID replication between Galera Cluster and standalone MySQL slave

Anybody has experience with setting up replication between Galera Cluster and standalone MySQL slave? I have a three nodes in Galera Cluster and I want to set up gtid replication to MySQL slave. The problem that is all Galera nodes write their own…
jumpy
  • 317
  • 1
  • 12
1
vote
1 answer

WARNING: The option --database has been used

Running mysqlbinlog to load up binary logs from one server to another. Consistently get message: WARNING: The option --database has been used. It may filter parts of transactions, but will include the GTIDs in any case. Yah -- OK? So?? Well maybe…
UncaAlby
  • 5,146
  • 1
  • 16
  • 19
1
vote
2 answers

How to check MySQL is running in GTID mode or not?

In MySQL-5.7, we have both GTID and Traditional methods to setup MySQL replication. We also have a new parameter: gtid_mode = ON_PERMISSIVE which means we can enable the GTID but also able to run replication in traditional way. Now we have…
Aman Aggarwal
  • 17,619
  • 9
  • 53
  • 81
1
2 3