简体   繁体   中英

Replication Between MySQL and AWS RDS MySQL : GTID Flag Issue

I am trying to set up a replication between MySQL running on an EC2 instance and AWS RDS MYSQL instance.

I am following this guide.

My master MYSQL db (running on EC2) has GTID mode turned on. My intended to be Slave(AWS RDS MYSQL) has GTID mode off, and apparently, there is no way to turn it on.

Due to this, when I start replication, I get following error on slave:

The slave IO thread stops because the master has @@GLOBAL.GTID_MODE ON and this server has @@GLOBAL.GTID_MODE OFF

I can't turn off my master's gtid mode. How can I make this replication work?

You can't enable the "gtid_mode=on" db parameter on the AWS rds at this moment. Please find the amazon forum reference below.

Ref:

https://forums.aws.amazon.com/thread.jspa?messageID=474345

I suggest you following the below reference documentation from AWS to achieve this.

Ref:

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MariaDB.Procedural.Replication.GTID.html

You can use the internal functionality of the aws rds named 'mysql.rds_set_external_master_gtid'.

Alternatively, You can use binary log method for the replication. You will find the bin-log parameter in the DB Parameter group.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM