Shantanu Nighot
magbanum.tech

magbanum.tech

An alternative method to view your Heroku Database tables

An alternative method to view your Heroku Database tables

How to view the content of your Heroku Database.

Shantanu Nighot
·Oct 9, 2022·

2 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

Table of contents

  • Download a small application
  • Run the application
  • Visit localhost
  • Get Database credentials
  • Connect to Database

In this article, I will tell you about an alternative method to view your database from the Heroku platform. Check the tables of your Heroku Postgres Database used by your website or an application.

When I deployed my application on Heroku, I was curious about checking tables created by Django and Models. But was unable to check it as Heroku provides no specific functionality to view what's inside a database. After exploring, I found this application that helped me go through my database tables.

Following are the quick steps to get started,

Download a small application

Firstly download the application file respective to your machine from this link and extract the zip file.

Run the application

Run this application and this will start one localhost session at https://localhost:8081 or any other port. image.png

Visit localhost

After visiting the respective localhost link, you will see the following page. image.png You will get an option to connect with your database using a standard URI, Database credentials or SSH.

Get Database credentials

Visit your application dashboard on Heroku, go to the Resources tab and click on Heroku Postgres. image.png On the Datastores page, go to the Settings tab and click on View Credentials. image.png You will get the Hostname, Database, User, Port, Password, URI and Heroku CLI information. image.png

Connect to Database

You can use these credentials to connect to your database. For this article, I will be using the URI method. Copy the URI from the Heroku dashboard, paste it into the Scheme tab and click on connect button. image.png This will open your database and the tables in it. image.png You can get a lot of information about your databases such as tables, rows and table structure. Find out now yourself by following the steps above.

Thank you for reading this article. You can also subscribe to my newsletter to receive my articles straight to your inbox.

Be better than Yesterday's you!

Did you find this article valuable?

Support Shantanu Nighot by becoming a sponsor. Any amount is appreciated!

Learn more about Hashnode Sponsors
 
Share this