Upgrading RDS MySQL Community from Version 5.5 to 5.7 — Read Replica

Girish V P
ADIBI Technologies, Basavanagudi, Blore.
2 min readJan 2, 2021

There are many ways you can do it. RDS instances with less storage and can afford more downtime, it is ok to modify the version incrementally from 5.5 to 5.6 and then 5.6.to 5.7.

For RDS instances with huge database size, we have to look for different methods. One of the methods is to create a read replica. Upgrade replica to 5.7 and replace the original RDS instance.

1- Create a custom  parameter group of type MySQL Community 5.7, which will be used during the upgrade to 5.7.2- Select RDS instance and create a read replica with Same VPC/subnet group, parameter group, security group etc.3- Select the Read Replica and Modify the version to 5.6.x. This time you cannot select Automatic backup or Multi-AZ. ( this can be done later).4- Once Read Replica status is "Available", select it again and Modify to Version 5.7.x. Along with select the Multi-AZ option as of the original Instance and Backup retention to non-zero value ( Selecting in these steps will change the time required later for promoting Read Replica  considerably).5- Once Read Replica status is "Available". Verify the version as 5.7.x. Check the Replica Lag in RDS console. This should be zero to proceed with next steps.6-  Make the Primary RDS instance as read only by setting parameter "read_only" to "1" in the parameter group associated with Primary RDS instance.7- Promote Read replica so that it will become a Writable.8- Modify (Rename DB instance identifier) the Original Primary to any arbitrary name.9- Modify (Rename DB instance identifier) the Original Replica to the name of primary RDS instance.10- Take the RDS snapshot of the New version live RDS Instance.11- take the RDS snapshot of the old version RDS Instance.12- Shutdown old version RDS instance.

Disclaimer: You are requested to test thoroughly before you implement in the production environment.

--

--