26

We are using AWS RDS Aurora MySQL 5.6 for our production database. AWS launched MySQL 5.7 compatible Aurora engine on 6th Feb, 2018.

I dont see any option in "modify instance" to change engine to MySQL 5.7 I dont see any option in restore snapshot to database with MySQL 5.7 either.

We want to do this upgrade with least downtime. Pls suggest what could be done here.

Satish Gadhave
  • 2,880
  • 3
  • 20
  • 27
  • Any update on this? How much downtime did you experience? – Zain Zafar May 29 '18 at 06:45
  • Now they have added option of 5.7 while restoring snapshot but you cant directly upgrade existing 5.6 database. Downtime depends on the size of database you want to restore from snapshot. – Satish Gadhave May 29 '18 at 07:53

6 Answers6

16

According to this link, you cannot upgrade an in-place database, you will need to restore a snapshot of the existing database and change the engine version during that process. These restrictions appear to be only temporary and may be lifted at a later point to allow for in-place upgra

sciorms
  • 171
  • 8
  • 2
    The limits seem to still be in place – The Onin Jul 04 '18 at 11:34
  • Has anyone out there tried this approach, and if so, any gotchas? I scanned the [5.7 upgrade guide](https://dev.mysql.com/doc/refman/5.7/en/upgrading-from-previous-series.html) and nothing about my current 5.6 implementation jumped out at me. But, for instance, would this approach require me to spin up a second DB instance with a different host URL? – Danny Bullis Jan 25 '19 at 21:26
  • Here's an [AWS RDS MySQL Upgrade guide](https://aws.amazon.com/about-aws/whats-new/2016/04/amazon-rds-mysql-now-supports-point-and-click-upgrade-from-mysql-5-6-to-5-7/) that describes some additional details around upgrading to 5.7 from a snapshot; still not clear to me if I would need to point my application to a new instance though. – Danny Bullis Jan 25 '19 at 21:30
  • 2
    This guide is for RDS which is different than Aurora. – Leo Romanovsky Jul 15 '20 at 01:27
6

The comments above are true; there is still no in place upgrade for 5.6 to 5.7; the process is still pretty easy though;

1) Go to the RDS dashboard, in the left hand menu there is a menu item called 'Snapshots'; you can either click on this if you are ok using a recent snapshot; otherwise select your database & on the actions drop down & choose 'Take Snapshot'

2) In snapshots simply select your snapshot & choose 'Restore Snapshot' from the actions drop down; it will automatically duplicate a bunch of your previous settings. Its at this juncture you can select the new database engine of 5.7

All and all you should allow for at least a half an hour of downtime for the whole process. Probably a couple of hours to be on the safe side.

Reece
  • 641
  • 7
  • 18
  • 3
    Should quality that it's only easy if a) you can accept downtime and b) your database is relatively small. – rjh Dec 10 '19 at 12:03
  • Yeh, although downtime is normally synonymous with with schema changes to relational databases wouldn't you say? Don't think that's specific to RDS. You don't have to have downtime, the snapshot part is very quick; but you probably should refuse clients while you're making schema changes. Size doesn't seem to be a problem, of course it will affect downtime duration; we migrated several million records in about half an hour. – Reece Jan 08 '20 at 19:03
  • Schema changes definitely don't mean downtime! Use a tool like pt-online-schema-change or gh-ost. – rjh Jan 12 '20 at 21:54
  • Yip; definitely not questioning the feasibility of whether a schema can be changed without downtime; rather the practical implications. E.g. you probably have coordinate the timing of things such as deploying your new codebase that consumes said new schema and any number of other dependant activation stages; all while letting your site users have live access? – Reece Jan 13 '20 at 22:15
4

You can now perform in-place upgrade from Aurora MyQSL from 5.6 to 5.7

Only a matter of invoking modify-db-cluster or modify-global-cluster (if you are using global clusters of course).

More in the docs (including how to do this using the AWS console).

DuDa
  • 3,718
  • 4
  • 16
  • 36
raffccc
  • 76
  • 2
  • Yes, Its doable now. in case anybody used terraform to create your infrastructure.. thiis might help. https://medium.com/hashicorp-engineering/upgrading-aurora-rds-using-terraform-3836a62757f thanks – Kiran Jan 19 '21 at 13:03
1

Easiest way is:

  1. Take a manual snapshot first of Aurora MySQL 5.6 cluster.

  2. Then, create a new Aurora MySQL 5.7 using that manual snapshot which was taken in step 1

  3. Your credentials would be same as that of the older 5.6 cluster.

  4. Verify if data is correct.

DhananjayK
  • 23
  • 5
0

Need was to upgrade the AWS RDS Aurora MySQL from 5.6 to 5.7 without causing any downtime to our production. Being a SaaS solution, we could not afford any downtime.

Background

We have distributed architecture based on micro services running in AWS Fargate and AWS Lambda. For data persistency AWS RDS Aurora MySQL is used. While there are other services being used, those are not of interest in this use case.

Approach

After a good deliberation on in place upgrade by declaring a downtime and maintenance window, we realized that having zero downtime upgrade is the need. As without which we would have created a processing backlog for us. High level approach was:

  1. Create an AWS RDS Cluster with the required version and copy the data from the existing RDS Cluster to this new Cluster
  2. Setup AWS DMS(Data Migration Service) between these two clusters
  3. Once the replication is done and is ongoing then switch the application to point to the new DB. In our case, the micro-services running in AWS Fargate has to upgraded with the new end point and it took care of draining the old and using the new.

For Complete post please check out

https://bharatnainani1997.medium.com/aws-rds-major-version-upgrade-with-zero-downtime-5-6-to-5-7-b0aff1ea1f4

Bharat
  • 201
  • 2
  • 9
-4

To manage an update for a DB instance or DB cluster

Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

In the navigation pane, choose Instances to manage updates for a DB instance, or Clusters to manage updates for an Aurora DB cluster.

Select the checkbox for the DB instance or DB cluster that has a required update.

Choose Instance actions for a DB instance, or Actions for a DB cluster, and then choose one of the following:

  • Upgrade now

  • Upgrade at next window

Note: If you choose Upgrade at next window and later want to delay the update, you can select Defer upgrade.

Baptiste Mille-Mathias
  • 2,144
  • 4
  • 31
  • 37