Mysql – Disable MySQL replication on rds

amazon ec2amazon-rdsawsMySQLreplication

I want set up replication between an Amazon RDS MySQL DB instance and a MySQL instance that is external to Amazon RDS.

but Slave_IO_Running: Connecting
how to solve this problem?

I have already done the following commands.

mysql>CALL mysql.rds_set_external_master ('192.168.xx.xxx', 3306,
    'repl2', '111111', 'mysql-bin-changelog.000003', 598, 0); 

mysql> CALL mysql.rds_start_replication; 

+-------------------------+
| Message                 |
+-------------------------+
| Slave running normally. |
+-------------------------+
1 row in set (1.01 sec)

enter image description here

Best Answer

The easy way to disable replication is to run this on the RDS slave

CALL mysql.rds_stop_replication;
CALL mysql.rds_reset_external_master;

If Slave_IO_Running is Connecting, then there is one or both of the issues

  • The grants for the repl2 user is wrong
  • firewall issue on port 3306.

If the issue is the grants, drop the repl2 and add it back with

DROP USER 'repl2'@'%';
CREATE USER 'repl2'@'%' IDENTIFIED BY '111111';
GRANT REPLICATION SLAVE,REPLICATION CLIENT ON *.* TO 'repl2'@'%';

I'll leave the FW/SecurityGroup stuff to you.

Once these are cleared up, run the CALL mysql.rds_set_external_master with the proper private IP. Please don't use 192.168.x.x.