sexta-feira, 18 de março de 2016

connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host

Still on my Postgres saga, after resolving the listen_address configuration, I ran into this other issue after trying to log into postgres remotely:

connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host

That was a bit simpler to figureout, since the message is quite straightforward: you need to change the pg_hba.conf to get this to work.

Since I don't like vi, I'm using nano to edit stuff, so I just did:

nano /var/lib/pgsql/data/pg_hba.conf

and edit the file like this:

# local      DATABASE  USER  METHOD  [OPTIONS]
host       all  all  0.0.0.0/0  md5

It might sound I bit unrestrictive, but this server is for development purposes and there is no need to be too picky about security (it is not on the cloud... all local).

A restart on the deamon

systemctl restart postgres

and it is deal! =)

I found some help here about this issue.

Check out my new book about R Language http://www.amazon.com/dp/B00SX6WA06

Nenhum comentário:

Postar um comentário

Leave your comment here!