I'm using WAMP server for running my php app. I have a database BOOK in phpmyadmin. How can I push this data to heroku. I have used add on to add cleardb to my app.
heroku config shows the database url too.
I tried
db:push mysql://root@localhost/BOOK
but it didn't work.
ERROR -->
Failed to connect to database:
Sequel::AdapterNotFound -> LoadError: cannot load such file -- mysql
If you don't have mysql installed locally, type "mysql" into terminal will inevitably result in "command not found". MAMP provides command line syntax to resolve this problem. Thus, if we don't want to change $PATH to use 'mysql' command directly (there is really no need, in my opinion, if all we are going to use command line mysql for is database migration), we can run the following import syntax:
And the database in exported_sql_file.sql will be imported to clearDB. For how to acquire 'username', 'hostname', and 'password' for the import syntax, refer to this tutorial for help.
ClearDB recommends using
mysql
andmysqldump
for importing data. From Frequently Asked Questions on ClearDB.com:Syntax for importing is something like this: