Mysql migration to AWS RDS

Migration of MySQL or MariaDB database to AWS RDS  is very much on demand  because of various benefits this AWS service offers (e.g., scalability and high availability).

However, there are several factors that need to be considered when developing a database migration strategy.

Key point to check


  • Availbility
  • Current usage
  • Security



Method for Migration

DMS
Using mysqldump utility

1. DMS


DMS is a database migration service . Allows us to migrate data from an on-premises database to RDS
Pros:-  DMS is great at importing data quickly
Cons:-  lacks in importing schema objects that are not directly part of the data such as triggers, functions, and stored procedures.


Step 1: Create the RDS instance

Step 2: Create the DMS replication instance and provision it in a subnet that can communicate with your non-RDS instance (source) and the RDS instance (target).

Step 3: Create a Source Endpoint and a Target Endpoint. The DMS instance will use this connection information to connect to the databases.

Step 4: Create the replication task.

Step 5: The migration process will begin.

Step 6: Validate data in the RDS instance.




2.  Mysqldump utility


Pros:-   it can retain the schema structure with the data.
Cons:-   it’s not effective for large databases. Importing the data from a large, single file can be time consuming because the import process is single threaded.


Step 1: SSH into the source database instance and run the mysql dump utility to save the database to a file.

Step 2: Create the RDS instance

Step 3: Log into the RDS MySQL instance and import the database by referencing the file saved from mysqldump.


Step 4: Validated  imported data in the RDS instance.

Comments

Popular posts from this blog

CICD pipeline using Jenkins