I just installed postgresql14 through homebrew on my mac, using brew install postgresql
After installing, I start postgresql and I try to start the shell with either psql -U postgres
or psql
both ask for a password, despite my pg_hba.conf file looking like this:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all trust
host replication all 127.0.0.1/32 trust
host replication all ::1/128 trust
On top of that, the ‘default’ passwords suggested by older solutions, or articles, all don’t work and I can’t seem to do anything about it.
George Sheng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.