I know there are a lot of similar questions on this site, but so far I've been unable to find any answers. I have a postgres 13 server running on a WSL distro, ubuntu 20.04. I am trying to connect a gui to the server. I've tried Postbird and pgAdmin 4, both give me a similar error:
'Unable to connect to server:
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?'
Steps I have tried:
- I can connect to the server inside of ubuntu by running psql.
- I have changed the postgresql.conf file to include listen_addresses = '*'
- I have modified the pg_hba.conf file to look like: pg_hba.conf
- I have confirmed that the server is indeed running on port 5432.
Thanks for reading. Any advice would be greatly appreciated.