Reputation: 7995
I have a Multi-AZ database instance in AWS RDS. I would like to connect to its secondary server located in the Secondary Zone for the instance using the MySQL CLI. Is this possible to do? If so, how do I find the correct endpoint to connect to?
I would like to use this access to the secondary server to run nightly analytics queries that I would prefer to avoid hitting the primary database server. It's okay for these queries to see a lag in replicated data from the primary database server. And I already have a database user created that limits those analytics queries to truly be read-only, so I don't need to worry about the analytics process accidentally issuing writes to the secondary database.
Upvotes: 0
Views: 1206
Reputation: 200436
You can't connect to the secondary server in an RDS MySQL Multi-AZ setup. You would have to add a read-replica server in order to do this.
Note that if you switched to Aurora MySQL a read-replica would act as your Multi-AZ failover server as well. There is a good table here listing the function of Multi-AZ standby servers and read-replica servers in RDS and Aurora databases.
Upvotes: 1