Looking at the database on heroku

You can use JackDB (http://www.jackdb.com).

JackDB is a database client in your web browser that has OAuth integration with Heroku. It lets you list your Heroku apps and their respective datasources and then connect to them to run SQL queries. See the docs for details of how to use it with Heroku.

Here's what it looks like:


There's also the JackDB Heroku plugin for the Heroku CLI. The plugin let's you run heroku jackdb from your command line to connect to your default database. There are additional options if you have more than one database and want to explicitly select which one you'd like to connect to.

To install it:

$ heroku plugins:install https://github.com/jackdb/jackdb-heroku-plugin.git

To connect to your default database:

$ heroku jackdb

Full disclosure: I'm the founder of JackDB.


Try

heroku pg:psql

You'll get to know next steps automatically


From https://devcenter.heroku.com/articles/heroku-postgresql

Heroku Postgres can be attached to a Heroku application via the CLI: $ heroku addons:add heroku-postgresql:dev

To establish a psql session with your remote database use heroku pg:psql.