We have our master RDS MySQL in AWS , and slave set up done in EC2 instance, MySQL version 5.7, I have done the initial set up and replication working fine with single Database. In my case in master there are multiple database so in slave I need to replicate all the databases in the master. So in master weekly new database will be added ,so how could I replicate the same in slave . what's the best practices for the same.

Current set up done: Installed MySQL in EC2 instance AWS RDS Read Replica created and stopped replication Taken the Database and restored in slave updated value of Relay_Master_Log_File, and -log_position is the value of Exec_Master_Log_Pos.

Given below the my.cnf configuartion

[mysqld]pid-file = /var/run/mysqld/mysqld.pidsocket = /var/run/mysqld/mysqld.sockdatadir = /var/lib/mysqllog-error
= /var/log/mysql/error.logserver_id=2replicate-do-db=db_name1

Please let me know is there any options to replicate all Database in master to slave.

For replication other database I have stopped the replication and taken dump and restored in slave and updated the position values .

I have modified the my.cnf configuration value as below.

replicate-do-db=db_name1,db_name2 started the slave, the slave seems no issues but master to slave sync is not working.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy