Skip to content

Instantly share code, notes, and snippets.

View ersinakinci's full-sized avatar

Ersin Akinci ersinakinci

View GitHub Profile
@ersinakinci
ersinakinci / migrate_from_aws_rds_mysql_to_heroku_postgres.md
Last active January 25, 2022 14:08
Migrating from AWS RDS MySQL to Heroku Postgres

Overview

  1. Expose your RDS instance to outside world.
  2. Use pgloader to copy over your MySQL db to a local Postgres instance on your development machine.
  3. Dump your local Postgres db.
  4. Use heroku pg:backups:restore to upload your Postgres db dump.

Steps

  1. Follow the basic instructions for preparing your AWS RDS instance for data export (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Exporting.NonRDSRepl.html). The most important part is to make sure that you have all your security settings (e.g., VPC, subnet, db security group if applicable) set up to expose port 3306 to the outside world and have your db root username and password. If you've forgotten your db's root password, follow these instructions to reset it: https://aws.amazon.com/premiumsupport/knowledge-center/reset-master-user-password-rds/