# Percona 5.7.32 switch to GTID online

**URL:** <https://forums.percona.com/t/percona-5-7-32-switch-to-gtid-online/9803>\
**Category:** Percona Server for MySQL 5.7\
**Tags:** mysql, percona\
**Created:** [March 24, 2021, 1:43pm UTC](https://forums.percona.com/t/percona-5-7-32-switch-to-gtid-online/9803 "2021-03-24T13:43:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BoneBunny](https://avatars.discourse-cdn.com/v4/letter/b/a88e57/32.png) [@BoneBunny](https://forums.percona.com/u/BoneBunny)\
**Post date:** [March 24, 2021, 1:43pm UTC](https://forums.percona.com/t/percona-5-7-32-switch-to-gtid-online/9803/1 "2021-03-24T13:43:48Z")

</div>

Hi,  
I would like to switch a running Master-Master-Slave setup to GITD based replication.  
As for MariaDB this step is quite straight forward and I’ve done this successfully several times.

For percona this seems to be a little different.  
I’ve found this guide: [Online GTID deployment](https://www.percona.com/doc/percona-server/5.6/flexibility/online_gtid_deployment.html#gtid_deployment_step)

If i try to set gtid\_mode=on I get the following error: “The value of @@GLOBAL.GTID\_MODE can only be changed one step at a time: OFF \<-\> OFF\_PERMISSIVE \<-\> ON\_PERMISSIVE \<-\> ON. Also note that this value must be stepped up or down simultaneously on all servers. See the Manual for instructions.”  
Do I just have to follow the steps OFF\_PERMISSIVE → ON\_PERMISSIVE → ON?

Another Way to migrate online to GTID I’ve found is as followed:  
On each server, execute:  
SET @@GLOBAL.ENFORCE\_GTID\_CONSISTENCY = WARN  
SET @@GLOBAL.GTID\_MODE = OFF\_PERMISSIVE  
SET @@GLOBAL.GTID\_MODE = ON\_PERMISSIVE

Wait until there are no more ongoing client transactions that need to be GTID-free.  
Wait until all transactions that existed are replicated to all servers  
On each server, execute: SET @@GLOBAL.GTID\_MODE = ON

```
STOP SLAVE;
CHANGE MASTER TO MASTER_AUTO_POSITION = 1;
START SLAVE;

```

This has to be executed on each slave server that should use the auto-positioning protocol.

So which way should be used?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [March 24, 2021, 2:00pm UTC](https://forums.percona.com/t/percona-5-7-32-switch-to-gtid-online/9803/2 "2021-03-24T14:00:54Z")

</div>

> [@BoneBunny](#):
>
> Do I just have to follow the steps OFF\_PERMISSIVE → ON\_PERMISSIVE → ON

Yes. This is correct. Set GTID = OFF\_PERMISSIVE on all servers in the group. Then, set ON\_PERMISSIVE on all servers. Then, lastly, set ON to all servers.

Once GTID is enabled on all machines, then you can stop replication and use auto-position.
