Manually exporting then importing a MySQL database off RDS

Today, I was wanting to export my MySQL database off of my RDS instance, and then place it onto a new instance. Doing this was pretty simple, I just needed to use mysqldump and figure out the right parameters:

mysqldump –databases my_data_base_name -v -h my_data_base_name.xxxxxx1mqh2a.us-west-2.rds.amazonaws.com -u my_user_name -P 3306 -p > rdsdump.sql

After I had the dump, I just then needed to copy it to my local computer, then reupload it to the computer that I was wanting to install it on. I used winscp as I was on my Windows laptop and not my mac.

After installing MySQL on the new server and uploading the rdsdump.sql file onto my new machine, I then just had to import the sql file so that it would work:

mysql -u my_user_name -p < rdsdump.sql

And voila, now have a ready to go back up of my database and can take it wherever it needs to go.

Leave a Reply

Your email address will not be published. Required fields are marked *