Unable to connect to local Postgres via GUI

169 views Asked by At

I recently ran a Postgres via Docker where in I have a Dockerfile that copies an init script to add new user, enable UUID extension, created database and grant privileges.

I can login using the default user "postgres" but not the second account "XXX_itsm". It says FATAL: database "XXX_itsm" does not exist. What I'm planning to do is just create a database but another problem occurred when connecting via GUI (Postico / TablePlus).

enter image description here

Which leads me to the following questions:

  1. What is the proper way of creating a user? (I have this current init script in entrypoint) enter image description here NOTE: I have the variables defined in Dockerfile ENV DB_USER DB_PASS DB_NAME

  2. Why it's only allowing me to login in GUI with the default user?

0

There are 0 answers