Changing GTID Mode on Online Servers Let the server run for a while with your normal workload and monitor the logs. If this step causes any warnings in the log, adjust your application so that it only uses GTID-compatible features and does not generate any warnings. This is the first important step. You must ensure that no warnings are being generated in the error logs before going to the next step. Important Note Important For instance, after step 6 has completed, you can execute  FLUSH LOGS  on the server where you are taking backups. Then either explicitly take a backup or wait for the next iteration of any periodic backup routine you may have set up. Ideally, wait for the server to purge all binary logs that existed when step 6 was completed. Also wait for any backup taken before step 6 to expire. This is the second important point. It is vital to understand that binary logs containing anonymous transactions, without GTIDs cannot be used after the next step. After this step, you must be sure that transactions without GTIDs do not exist anywhere in the topology. SET @@GLOBAL.ENFORCE_GTID_CONSISTENCY = ON; SET @@GLOBAL.GTID_MODE = OFF_PERMISSIVE; It does not matter which server executes this statement first, but it is important that all servers complete this step before any server begins the next step. SET @@GLOBAL.GTID_MODE = ON_PERMISSIVE; It does not matter which server executes this statement first. SHOW STATUS LIKE ’ONGOING_ANONYMOUS_TRANSACTION_COUNT’; On a replica, it is theoretically possible that this shows zero and then nonzero again. This is not a problem, it suffices that it shows zero once. 2. On each server, execute: 3. On each server, execute: 4. On each server, execute: 5. On each server, wait until the status variable  ONGOING_ANONYMOUS_TRANSACTION_COUNT  is zero. This can be checked using: 6. Wait for all transactions generated up to step 5 to replicate to all servers. You can do this without stopping updates: the only important thing is that all anonymous transactions get replicated. 7. If you use binary logs for anything other than replication, for example point in time backup and restore, wait until you do not need the old binary logs having transactions without GTIDs. See Section 17.1.4.4, “Verifying Replication of Anonymous Transactions”  for one method of checking that all anonymous transactions have replicated to all servers. 3478