Sample Header Ad - 728x90

can't connect to remote postgresql database

24 votes
2 answers
87203 views
I'm trying to connect to a remote psql database. Before I added the pg_hba.conf entry with the client's IP address, I was getting an error message : xdev@xdevbox:~$ psql -U postgres testdb -h 10.1.1.47 psql: FATAL: no pg_hba.conf entry for host "10.201.50.71", user "postgres", database "testdb", SSL off I added the client's IP with trust settings. I also changed the listen address in postgres.conf on the server to listen to "*". Then I restarted the database server using /etc/init.d/postgresql restart command. Now when I try to connect, I get the following error message: psql: could not connect to server: Connection refused Is the server running on host "10.1.1.47" and accepting TCP/IP connections on port 5432? in postgresql.conf, the port is set to 5432. I'm not sure what else to check. Thanks
Asked by dot (781 rep)
May 4, 2015, 05:45 PM
Last activity: Mar 16, 2022, 09:21 AM