patternsqlMinor
no pg_hba.conf entry for host "[local]", user "pgadmin", database "postgres", SSL off on OSX
Viewed 0 times
pgadminconfentrylocalosxpostgresuserpg_hbadatabasehost
Problem
local all postgres trust
host all all 0.0.0.0/0 trust
hostnossl all all 0.0.0.0/0 trustI would think either the second or the third would match these criteria.
I've restarted my service on brew with brew service restart postgres@9.6
Am I missing some setting here?
Solution
First, the meanings of the fields are:
The attempt is:
host = “[local]” (meaning through a Unix domain socket)
user = “pgadmin”
database = “postgres”
SSL = off
Now your lines:
does not match because the user pgadmin is not postgres
does not match because
does not match for the same reason than the previous line.
If you want to "trust" everyone locally through the Unix domain socket, you may change the first line to:
# local DATABASE USER METHOD [OPTIONS]
# host DATABASE USER ADDRESS METHOD [OPTIONS]
# host[no]ssl DATABASE USER ADDRESS METHOD [OPTIONS]The attempt is:
host = “[local]” (meaning through a Unix domain socket)
user = “pgadmin”
database = “postgres”
SSL = off
Now your lines:
local all postgres trustdoes not match because the user pgadmin is not postgres
host all all 0.0.0.0/0 trustdoes not match because
host only matches TCP/IP connections and [local] is not a TCP/IP connection.hostnossl all all 0.0.0.0/0 trustdoes not match for the same reason than the previous line.
If you want to "trust" everyone locally through the Unix domain socket, you may change the first line to:
local all all trustCode Snippets
# local DATABASE USER METHOD [OPTIONS]
# host DATABASE USER ADDRESS METHOD [OPTIONS]
# host[no]ssl DATABASE USER ADDRESS METHOD [OPTIONS]local all postgres trusthost all all 0.0.0.0/0 trusthostnossl all all 0.0.0.0/0 trustlocal all all trustContext
StackExchange Database Administrators Q#193242, answer score: 4
Revisions (0)
No revisions yet.