Dump sql file to ClearDB in Heroku

https://stackoverflow.com/questions/11803496/dump-sql-file-to-cleardb-in-heroku/11803685

Ask Questionarrow-up-rightAsked 7 years, 5 months agoActive 4 years, 4 months agoarrow-up-rightViewed 12k times1516

I have a sql file that I want to be dumped into a MySQL database that I have in Heroku using the ClearDB addon. When dumping in local I do the following:

mysql -u my_user -p mydatabasename < my_dump_file.sql

However, I don't have any clue on how to dump it to the Heroku MySQL database. All I know is this address:

mysql://b5xxxxx7:37xxxad@us-cdbr-east.cleardb.com/heroku_xxxxxx?reconnect=true

But if I try to do:

mysql://b5xxxxx7:37d8faad@us-cdbr-east.cleardb.com/heroku_xxxxxx?reconnect=true < my_dump_file.sql

I get No such file or directory.

How am I supposed to do it?mysqlarrow-up-right ruby-on-railsarrow-up-right rubyarrow-up-right herokuarrow-up-rightsharearrow-up-rightimprove this questionarrow-up-rightedited Mar 3 '14 at 22:22arrow-up-rightarrow-up-rightIsmael Abreuarrow-up-right15.2k22 gold badges5353 silver badges7070 bronze badgesasked Aug 3 '12 at 21:24arrow-up-rightHommer Smitharrow-up-right20k4545 gold badges124124 silver badges228228 bronze badges

add a commentarrow-up-right

2 Answers

activearrow-up-rightoldestarrow-up-rightvotesarrow-up-right33

You might be able to do something like this

sharearrow-up-rightimprove this answerarrow-up-rightedited Sep 4 '13 at 10:46arrow-up-rightanswered Aug 3 '12 at 21:41arrow-up-rightIsmael Abreuarrow-up-right15.2k22 gold badges5353 silver badges7070 bronze badges

add a commentarrow-up-right2

It doesn't work for me on the new version of mysql. So I tried following code:

and then it asks your password.sharearrow-up-rightimprove this answerarrow-up-rightedited Sep 9 '15 at 23:30arrow-up-rightanswered Sep 9 '15 at 23:19arrow-up-rightHamid Hoseiniarrow-up-right1,0961111 silver badges1818 bronze badgesadd a commentarrow-up-right

Your Answer

Last updated