免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2015年12月23日 星期三

RDS as replica slave, RDS as replica master

//=== http://it.3hd.me/2015/05/mysql-replication-from-remote-rds-to.html

on master side (remote RDS)

mysql> call mysql.rds_set_configuration('binlog retention hours', 24);"
mysql> GRANT REPLICATION SLAVE,REPLICATION CLIENT ON *.* TO 'repl_user'@'%' IDENTIFIED BY 'repl_passwd';

[Q] is 'on *.*' must? why not only on the target database 'on db_to_be_replicated.*' ?
[Q] 'repl_user'@'%' shd be changed to 'repl_user'@'slave_public_ip' ?
[Q] 'repl_user'@'slave_public_ip' --> 'repl_user'@'slave_host_domain_name' ??
[Q] is REPLICATION CLIENT optional?




//=== http://it.3hd.me/2015/04/mysql-replication-set-up.html

on slave side (RDS as replica slave)

*** since RDS not allow stop slave/start slave/change master to
-->
mysql> CALL mysql.rds_stop_replication;

mysql> CALL mysql.rds_set_external_master ('master.masters.com', 3306,
'repl_user', 'password', 'myrds-bin.00003', 107, 0);

mysql> CALL mysql.rds_start_replication


*** 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,
i.e.
one RDS instance as master,
the other one external instance as slave




//===

* logon to master RDS by repl_user to verify the granted privileges
$ mysql -h rds_master -u repl_user -p
mysql> show grants;

沒有留言:

張貼留言