Unable to do mysqldump to AWS RDS

admin

Administrator
Staff member
I'm trying to export an existing MySQL DB from an AWS EC2 instance to RDS using mysqldump. Here's my syntax:

<blockquote>
mysqldump wordpress-db | mysql --host= --port=3306 --user= --password wordpress-db
</blockquote>

...where wordpress-db is an existing MySQL DB on my EC2 instance and wordpress-db is also the name of the RDS DB (the endpoint begins with "wordpress-db").

The error message is:

<blockquote>
ERROR 1049 (42000): Unknown database 'wordpress-db'
Both the EC2 instance and RDS DB are in the same region...
</blockquote>

I'm a bit new to RDS so there's probably something obvious I'm doing wrong. Any ideas?
Thanks,