# Unable to get replication going- can't turn off GTID?

**URL:** <https://forums.percona.com/t/unable-to-get-replication-going-cant-turn-off-gtid/4680>\
**Category:** Percona XtraBackup\
**Created:** [January 23, 2016, 3:34pm UTC](https://forums.percona.com/t/unable-to-get-replication-going-cant-turn-off-gtid/4680 "2016-01-23T15:34:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alyssenko](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@alyssenko](https://forums.percona.com/u/alyssenko)\
**Post date:** [January 23, 2016, 3:34pm UTC](https://forums.percona.com/t/unable-to-get-replication-going-cant-turn-off-gtid/4680/1 "2016-01-23T15:34:50Z")

</div>

I am trying to enable replication from an older version of MariaDB on the master (5.5.36) to a newer version on the slave (10.1.10). Since the master doesn’t support GTID I’m trying to turn it off…

After successfully preparing the backup I attempt to start replication:

CHANGE MASTER TO  
MASTER\_HOST=‘x.x.x.x’,  
MASTER\_USER=‘replicate’,  
MASTER\_PASSWORD=‘xxxx’,  
MASTER\_PORT=3306,  
MASTER\_LOG\_FILE=‘mysql-bin.005214’,  
MASTER\_LOG\_POS=890018419,  
MASTER\_CONNECT\_RETRY=10,  
MASTER\_USE\_GTID=no;

This is what I’m seeing in the mysql error log:

[ERROR] Slave I/O: Unable to load replication GTID slave state from mysql.gtid\_slave\_pos: Table ‘mysql.gtid\_slave\_pos’ doesn’t exist, Internal MariaDB error code: 1146  
[Note] Slave SQL thread initialized, starting replication in log ‘mysql-bin.005214’ at position 890018419, relay log ‘./mysql-relay-bin.000001’ position: 4  
[ERROR] Slave SQL: Unable to load replication GTID slave state from mysql.gtid\_slave\_pos: Table ‘mysql.gtid\_slave\_pos’ doesn’t exist, Internal MariaDB error code: 1146  
[Note] Slave I/O thread: connected to master ‘replicate@x.x.x.x:3306’,replication started in log ‘mysql-bin.005214’ at position 890018419  
[ERROR] Slave SQL: Error ‘Duplicate entry ‘46082’ for key ‘PRIMARY’’ on query. Default database: ‘etl\_execution’. Query: ‘INSERT INTO `batches` (`batch_file`, `completed_at`, `created_at`, `status`) VALUES (’/home/x/x.ebf’, NULL, ‘2016-01-20 09:14:03’, ‘executing’)', Internal MariaDB error code: 1062  
[Warning] Slave: Duplicate entry ‘46082’ for key ‘PRIMARY’ Error\_code: 1062  
[ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with “SLAVE START”. We stopped at log ‘mysql-bin.005214’ position 890018495

I feel like I’m close to getting the replication up and running but not sure what to do now- any help would be much appreciated- thanks guys.

---

<div class="post-metadata">

**Author:** ![alyssenko](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@alyssenko](https://forums.percona.com/u/alyssenko)\
**Post date:** [January 23, 2016, 3:44pm UTC](https://forums.percona.com/t/unable-to-get-replication-going-cant-turn-off-gtid/4680/2 "2016-01-23T15:44:18Z")

</div>

And here is the output of show slave status:

SHOW SLAVE STATUS\G  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 1. row \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Slave\_IO\_State: Waiting for master to send event  
Master\_Host: x.x.x.x  
Master\_User: replicate  
Master\_Port: 3306  
Connect\_Retry: 10  
Master\_Log\_File: mysql-bin.005215  
Read\_Master\_Log\_Pos: 18081409  
Relay\_Log\_File: mysql-relay-bin.000002  
Relay\_Log\_Pos: 609  
Relay\_Master\_Log\_File: mysql-bin.005214  
Slave\_IO\_Running: Yes  
Slave\_SQL\_Running: No  
Replicate\_Do\_DB:  
Replicate\_Ignore\_DB:  
Replicate\_Do\_Table:  
Replicate\_Ignore\_Table:  
Replicate\_Wild\_Do\_Table:  
Replicate\_Wild\_Ignore\_Table:  
Last\_Errno: 1062  
Last\_Error: Error ‘Duplicate entry ‘46082’ for key ‘PRIMARY’’ on query. Default database: ‘etl\_execution’. Query: ‘INSERT INTO `batches` (`batch_file`, `completed_at`, `created_at`, `status`) VALUES (’/home/x/x.ebf’, NULL, ‘2016-01-20 09:14:03’, ‘executing’)’  
Skip\_Counter: 0  
Exec\_Master\_Log\_Pos: 890018495  
Relay\_Log\_Space: 236200034  
Until\_Condition: None  
Until\_Log\_File:  
Until\_Log\_Pos: 0  
Master\_SSL\_Allowed: No  
Master\_SSL\_CA\_File:  
Master\_SSL\_CA\_Path:  
Master\_SSL\_Cert:  
Master\_SSL\_Cipher:  
Master\_SSL\_Key:  
Seconds\_Behind\_Master: NULL  
Master\_SSL\_Verify\_Server\_Cert: No  
Last\_IO\_Errno: 0  
Last\_IO\_Error:  
Last\_SQL\_Errno: 1062  
Last\_SQL\_Error: Error ‘Duplicate entry ‘46082’ for key ‘PRIMARY’’ on query. Default database: ‘etl\_execution’. Query: ‘INSERT INTO `batches` (`batch_file`, `completed_at`, `created_at`, `status`) VALUES (’/home/x/.ebf’, NULL, ‘2016-01-20 09:14:03’, ‘executing’)’  
Replicate\_Ignore\_Server\_Ids:  
Master\_Server\_Id: 101  
Master\_SSL\_Crl:  
Master\_SSL\_Crlpath:  
Using\_Gtid: No  
Gtid\_IO\_Pos:  
Replicate\_Do\_Domain\_Ids:  
Replicate\_Ignore\_Domain\_Ids:  
Parallel\_Mode: conservative

---

<div class="post-metadata">

**Author:** ![alyssenko](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@alyssenko](https://forums.percona.com/u/alyssenko)\
**Post date:** [January 25, 2016, 9:54am UTC](https://forums.percona.com/t/unable-to-get-replication-going-cant-turn-off-gtid/4680/3 "2016-01-25T09:54:10Z")

</div>

I was able to resolve by importing the data again from master, prepping the backup (ammending logs), starting mysql with the slave off, and then specifying master info with ‘Using\_Gtid’ set to ‘no’. I still see:

[ERROR] Slave I/O: Unable to load replication GTID slave state from mysql.gtid\_slave\_pos: Table ‘mysql.gtid\_slave\_pos’ doesn’t exist, Internal MariaDB error code: 1146

In the error log, but replication is working.
