Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

AWS documentation has this page that talks about importing and exporting data from MySQL server, but it's mostly about import. The only thing I see in their documentation is a way to export 5.6 data using replication, which is documented here. I was wondering if there is a simpler way to export data using mysqldump and load in the local database. The database that I want to export is not huge, maybe 1GB, so size is not an issue.

closed

1 Answer

0 votes
by (44.4k points)
selected by
 
Best answer

Take the dump from the remote RDS Server:

mysqldump -h rds.hostname -u remote_user_name -p remote_db > dump.sql

When prompted for a password, give the password for user=remote_user_name (remote server)

Upload it to your local MySQL instance:

mysql -u local_user_name -p local_db < dump.sql

Also, if you own an ec2 server in the same region, I'd suggest taking a dump there. zip the file and then scp it to your local machine. Typically, the compressed version of the file would be much smaller and you'd be able to transfer it quicker.


You can read AWS EC2 to get more information about AWS Elastic Cloud Computing.

Enroll yourself in the best online SQL courses to learn in-depth about SQL statements, queries and become proficient in SQL.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...