0

In my pc I have postgressql running locally on port 5432, I am also running a docker container with pgadmin4. I am trying to use that docker pgadmin4 to manage the local postgres database but I am getting "could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?" I have already done this to allow conections to postgres

I edited the PostgreSQL client authentication configuration file pg_hba.conf and add the following at the end:

host all all all md5

I edited the PostgreSQL configuration file postgresql.conf file and replaced this line

listen_address='127.0.0.1'

with:

listen_addresses = '*'

But I cannot conect to the postgres local database from pgadmin4 I tried to connect from pgadmin4 with these options

Ernesto Ruiz
  • 736
  • 9
  • 31

1 Answers1

0

Try putting host.docker.internal in the hostname, and 5432 in port, it should point to your Postgres running on your host

eitann
  • 1,203
  • 10
  • 23