Learn about architecting a highly available RDS MySQL implementation to support your high-performance applications and production workloads. We will also talk about best practices in the areas of security, storage, compute configurations, and management that will contribute to your success with Amazon RDS for MySQL. In addition, you will learn about how to effectively move data between Amazon RDS and on-premises instances.
9. mysql> GRANT SELECT,REPLICATION USER,REPLICATION CLIENT ON *.* TO repluser@‘<RDS Endpoint>' IDENTIFIED BY ‘<password>';
Create replication user on the master
Record the “File” and the “Position” in the backup
$ mysqldump --databases sampledb--master-data=2 --single-transaction -r sampledbdump.sql-u mysqluser–p mysqluserpassword
-- --Position to start replication or point-in-time recovery from-- --CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin-changelog.000031', MASTER_LOG_POS=107;
10. Configure replication target
mysql> call mysql.rds_set_external_master(‘<master server>',3306,‘<replicationuser>',‘<password>','mysql-bin-changelog.000031',107,0);
mysql> call mysql.rds_start_replication;
Configure the replication target and start replication
Stop the app pointing at the source. Stop replication after target catches up
mysql> call mysql.rds_stop_replication;
Promote target Amazon RDS database instance
mysql> call mysql.rds_reset_external_master;
Point the app at the target Amazon RDS database instance
11. AWS Region
App
Dump Data
Staging server
scp& load
Master
Slave
mysql> call mysql.rds_set_configuration('binlogretention hours', 48);
16. [ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: ‘Client requested master to start replication from impossible position;
24. 0
5000
10000
15000
20000
25000
30000
10
30
50
70
90
110
130
150
170
190
210
230
250
270
290
310
330
350
370
390
410
430
450
470
490
510
530
550
570
590
610
630
650
670
690
Transactions per Second
Time (sec)
Workload with 50/50 R/W ratio
Unwarmed Cache
Warmed Cache
4X
9 min
25.
26. mysql> CREATE EVENT ‘evt_dump_innodb_cache’
ON SCHEDULE EVERY 1 HOUR STARTS ‘2014-11-06 01:00:00’
DO BEGIN
CALL mysql.rds_innodb_buffer_pool_dump_now();
END