0
votes

Here is my pg_hba.conf entry.

TYPE DATABASE USER ADDRESS METHOD

"local" is for Unix domain socket connections only

local all all trust

However when I try to connect with sql, I get the following error.

sql: FATAL: no pg_hba.conf entry for host "

What am I missing? This works from anywhere once I include the following line.

host all all 0.0.0.0/0 md5

But my intent is only local connection.

1

1 Answers

0
votes

In questions like this, its better if you clarify how are you trying to connect (more specifics) to the database.

If you just want all local connections to work, you could try this.

host all all 127.0.0.1/32 md5

Either way, reading the pg_hba manual is a sure way to know how to construct the above line.