I have 2 machines sitting on my desk and connected to the same IP network. I'm trying to connect an application from one machine to the postgres database on the other. At first the host with the application on it was giving me the PSQLException:
FATAL: no pg_hba.conf entry for host "192.168.1.18", user "user1", database "test", SSL off
So I edited my pg_hba.conf file to accept the IP address: 192.168.1.18, by adding the line below at the end of the file:
host pnp all 192.168.1.18 trust
Then I got another type of error message:
FATAL: missing or erroneous pg_hba.conf file
Is there anything I'm missing here?
Thanks, Lancelot
You have to specify the netmask of the host too. So either "192.168.1.18/32
" or "192.168.1.18 255.255.255.255
" instead of the bare IP address.
See the pg_hba.conf file chapter in the online manual for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With