Reputation: 317
I am able to do a mysqldump locally that amounts to about 90kb using
/usr/local/mysql/bin/mysqldump -u root -p localDbName > /Users/Shared/localDbName-9-6-12.sql
I am trying to populate a newly setup amazon rds db. When I enter
/usr/local/mysql/bin/mysqldump -u root -p localDbName | mysql --host=Endpoint --user=MasterUsername --password=amazondbpassword amazonDBName
I get
-bash: mysql: command not found
then it prompts me for my own local password. After entering my password for the mysqldump i get
mysqldump: Got errno 32 on write
I would really appreciate some explanation/help for what I am doing wrong.
Upvotes: 2
Views: 1106
Reputation: 544
You're using the full path for mysqldump but forgot to use on mysql, you have to change the command to:
/usr/local/mysql/bin/mysqldump -u root -p localDbName | /usr/local/mysql/bin/mysql --host=Endpoint --user=MasterUsername --password=amazondbpassword amazonDBName
Good luck
Upvotes: 0
Reputation: 44244
The second error, mysqldump: Got errno 32 on write
arises because of the first error, -bash: mysql: command not found
. You sure mysql is installed properly on your machine, and the bin file is in your $PATH
?
Upvotes: 2