I need to pull the heroku db to my local and also push my db to the heroku remote. Locally I have MYSQL and in heroku it is Postgresql. I found lot ways suggested in internet but none seems to be working and most of them are very old and things have changed.
Things tried:
heroku db:push - didnt work
$ heroku db:push
! `db:push` is not a heroku command.
! Perhaps you meant `pg:push`.
! See `heroku help` for a list of available commands.
heroku pg:push : Here am not sure how to mention the source database (and i dont have a local db password)
$ heroku pg:push mysql://root:@localhost/app_development --app myapp
Usage: heroku pg:push <SOURCE_DATABASE> <REMOTE_TARGET_DATABASE>
push from SOURCE_DATABASE to REMOTE_TARGET_DATABASE
REMOTE_TARGET_DATABASE must be empty.
SOURCE_DATABASE must be either the name of a database
existing on your localhost or the fully qualified URL of
a remote database.
Info:
$ heroku version
heroku-toolbelt/3.37.0 (x86_64-linux) ruby/2.2.1
You have no installed plugins.
OS : Ubuntu 14.04
$ heroku pg:info --app myapp
=== DATABASE_URL
Plan: Hobby-dev
Status: Available
Connections: 1/20
PG Version: 9.4.1
Created: 2015-05-16 07:05 UTC
Data Size: 6.7 MB
Tables: 6
Rows: 0/10000 (In compliance)
Fork/Follow: Unsupported
Rollback: Unsupported