How can I view the records of a database in Heroku?

1

After doing deploy to my application, how can I see the records of the BD% tables postgresql in Heroku ?

    
asked by Alejandro Montilla 17.01.2017 в 20:22
source

2 answers

0

You will need a postgres client either pgadmin3 or postico .

In this page of heroku you select the database you want to connect to and then find where it says "Database Credentials" click on " Get credentials for manual connections to this database "

You will get the following information:

In pgadmin3, when you create a new connection in properties, you put the previously obtained data, remember to put the name of the Database in Maintenance DB and remove postgres (this is how it works for me).

If you want to connect through the command line, I did it with the following command in mac or linux:

heroku pg:psql HEROKU_POSTGRESQL_RED_URL --app NOMBRE

Do not forget to change NAME by the name of your app.

    
answered by 18.01.2017 / 23:48
source
1

You can connect to the database using a local tool depending on the operating system, in the heroku control panel you can find the remote accesses for the database.

Here I leave the official documentation about your question

link

You can also try to make a connection via ssh tunnel to the heroku server and from there connect to the database in the same way using a local client.

    
answered by 17.01.2017 в 20:28