How to import Existing EC2 instance mysql backup to RDS instance

0
18
MySQL

This tutorial explains how to import Existing EC2 instance mysql backup to RDS instance.

Steps

  1. Login to SSH to EC2 Instance
sudo -i

mysql -h hostname -P 3306 -u username -p password

2. Create database

create database dbname;

3. Run the following command

\q

4. Run following command to import backup file

mysql -h host.address.for.rds.server -u rdsusername -p  rdsdatabase < backupfile.sql

5. You can test it

show tables

LEAVE A REPLY

Please enter your comment!
Please enter your name here