Skip to main content

Posts

Showing posts from June, 2018

How to move sql file into RDS

In this post, we are going to see how to bring data from mysql to RDS. The first thing you gonna need to do is a dump of your db to a sql file so we can than bring it into the RDS. So, here we go. If you have not done it already go to the RDS console and create or launch a new mysql db instance. Take note of the following infos: db name, db user, db passwd and the db endpoint. We gonna use all that with mysql command to bring all tables of our mysql into the RDS. So, next we need to create our dump file. Log into your instance to get access to mysql cli. You can login like this: ssh -i file.pem user@IP To get inside mysql cli: mysql -u root Create a dump of your database: mysqldump -u root db_name > file.sql This will create a dump of your db on your user location. Exit the mysql cli to check if the file was created. We can take advantage of the mysql cli of our previously db to run our last command to bring the file into our new RDS instance. mysql -h yo