//=== https://dev.mysql.com/doc/refman/5.0/en/change-master-to.html
//=== http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/mysql_rds_set_external_master.html
*** "change master to" command is run on slave side
*** "change master to" is not allowed on RDS,
--> ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation
--> use "CALL mysql.rds_set_external_master" instead
[""" Warning
Do not use mysql.rds_set_external_master to manage replication between two Amazon RDS DB instances.
Use it only when replicating with an instance of MySQL running external to RDS..."""]
mysql> STOP SLAVE; -- if replication was running
RDS mysql> CALL mysql.rds_stop_replication;
mysql> CHANGE MASTER TO
MASTER_HOST= 'master-ip',
MASTER_PORT=3306,
MASTER_USER='u13_repl',
MASTER_PASSWORD='u13_passwd',
MASTER_LOG_FILE='binlog.0000x',
MASTER_LOG_POS=pos
RDS mysql> CALL mysql.rds_set_external_master ('master-ip', 3306, 'u13_repl', 'u13_passwd', binlog-fname, binlog-pos, 0);
mysql> START SLAVE; -- if you want to restart replication
RDS mysql> CALL mysql.rds_start_replication;
RDS mysql> CALL mysql.rds_reset_external_master;
[clear config for master host on RDS slave]
+----------------------+
| message |
+----------------------+
| Slave has been reset |
+----------------------+
1 row in set (0.06 sec)
Query OK, 0 rows affected (0.06 sec)
2015年4月7日 星期二
mysql , change master to, RDS limitation
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言