AWS Classroomnotes 06/Jan/2022

Database Migration using AWS Database Migration Service

  • In the previous session we have create a vm and installed the mysql db
  • We have the following users in mysql database
select user from mysql.user;


* To do the the migration we need some database to be present with tables and records in mysql
* Lets configure the employees database Refer Here
* Steps:

git clone https://github.com/datacharmer/test_db.git
cd test_db
sudo mysql -t < employees.sql


* Now lets use the following commands

create user 'migration'@'%' Identified by 'MotherIndia@123';
GRANT ALL PRIVILEGES ON employees.* TO 'migration'@'%';
  • Now lets test the connectivity from other machine
  • To fix the connectivity change the bind address from 127.0.0.1 to 0.0.0.0 /etc/mysql/mysql.conf.d/mysqld.cnf
  • Restart the mysql service
sudo systemctl daemon-reload
sudo service mysql restart
  • Now test the connection from mysql command line or mysql workbench
  • Refer Here for installing mysql shell on windows
  • Refer Here to download workbench

Migration Approaches

  • Our aim is to migrate the database from on-premises to AWS RDS
  • Data in the database will be constantly updated by applications, so database is constantly changing.
  • One approach for migration is to take the downtime (Offline Approach)
  • Export the data from database into some format
  • Create an RDS Instance and import the exported data
  • Not possible if the database size is huge
  • Second approach is online migration:
  • Here we migrate the data using DMS to RDS in incremental fashion
  • Then we will validate the data and run some comparision tests
  • when everything is fine, we announce a cut over date and migrate
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%