View data in postgres DB from pgAdmin4

I started the postgres database in docker and it has a running status threre on port 5432

I made a connection with this port through pgAdmin4 but when I try to view DB there is no bookbrainz DB and if I set the value of maintenance database to bookbrainz it shows error message saying “bookbrainz database does not exist” -

Can somebody please help me ?

It looks like the database hasn’t been initialized yet.
Did you follow the instructions here and run the script ./scripts/database-init-docker.sh ?

Yes , I initialized the database successfully. If I list databases through docker cli for postgres , you can see the bookbrainz database there -

I am using pgAdmin4 in my local windows OS.
So is there any way to access this database trough local pgAdmin4 server ?
It will be really helpful to interact with the database through GUI.

@mr_monkey Ok after researching about docker and pgAdmin4 i got it.
I installed pgAdmin4 in another docker container.
To get the Host connection URL I used the command -
docker inspect postgres | grep Gateway
I ran the pgAdmin4 in my chrome and connected with the database successfully :wink:
I referred this article for setting up the pgAdmin4 in docker container -
How to Run PostgreSQL and pgAdmin Using Docker | by Mahbub Zaman | Towards Data Science.

The result is now satisfying :slight_smile: -

2 Likes

Glad you got it working !

On my own machine, I use DBeaver, an open-source database utility which I find absolutely great.
I use it to connect to localhost:5432 as you’d expect and didn’t have to do anything special or run through Docker, if it’s easier for you.

2 Likes

@prasad39 hey !
are you able to see the database dumps ? i could only see shemas here not the actuall data table ?
i am not sure about it.