Dump sql file to ClearDB in Heroku

后端 未结 4 763
萌比男神i
萌比男神i 2021-01-30 09:33

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          


        
4条回答
  •  甜味超标
    2021-01-30 10:23

    I was getting errors when I typed it all at once so I broke it down into small steps first I entered my MySQL details like so:

    mysql --host=us-cdbr-iron-east-02.cleardb.net --user=xxxxxxxxxxxxxx --password=xxxxxxxx --reconnect 
    

    then once I got in I changed to the database like so:

    mysql> use heroku_xxxxxxxxxx;

    then I now imported the SQL file like so:

    mysql> source path/to/file.sql;

提交回复
热议问题