Unable to connect to server: PgAdmin 4

In case someone is running the pgadmin-4 in docker, and not able to connect to postgres container, like me.
The solution is to first find the ip at which the docker image is running.

Step-1, make sure the postgres container is running.

Step-2 write command- PS C:\docker> docker ps
Should result as below or similar,

enter image description here

Step3- in order to find the ip address running the postgres use part of container ID and analyze like below command

PS C:\docker> docker inspect fc834
enter image description here
Note: Here I have only used part of container id that is fc834..

This should result the following or similar,
Step4-

Use this ip address in the connection as below with your correct username and password

enter image description here
enter image description here

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)