1

I'm getting authentication error like below with a right password I put during the installation.

Read similar questions and answers but couldn't find a working solution for version 13.

Tried empty password and all default passwords too. Can someone please help?

Unable to connect to server:

could not initiate GSSAPI security context: The operation or option is not available
could not initiate GSSAPI security context: Credential for asked mech-type mech not found in the credential handle
FATAL: password authentication failed for user "postgres"

My /Library/PostgreSQL/13/data/pg_hba.conf:

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            peer
# IPv6 local connections:
host    all             all             ::1/128                 peer
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     peer
host    replication     all             127.0.0.1/32            peer
host    replication     all             ::1/128                 peer

enter image description here

roe
  • 299
  • 1
  • 3
  • 10
  • What exactly is the connection request, and which client are you using? What is the line in the PostgreSQL log that belongs to that failed connection attempt? – Laurenz Albe Nov 09 '20 at 09:17
  • @LaurenzAlbe I'm trying to connect a server via pgadmin4. psql logging in also not working with an error "psql: error: could not connect to server: FATAL: password authentication failed for user "postgres" – roe Nov 10 '20 at 00:15
  • FYI, tried to change the method `scram-sha-256` in `pg_hba.conf` to `trust` -- didn't work, to `peer` -- didn't work. – roe Nov 10 '20 at 00:16

1 Answers1

0

It gets resolved with the config I uploaded once I reboot my computer.

roe
  • 299
  • 1
  • 3
  • 10
  • Which config are you referring to? Did it work when you changed it to `trust` and reboot the computer or when you changed it to `peer` and reboot the computer? Also, did using `scram-sha-256` work at all in the future? – Ananta K Roy Jul 26 '21 at 04:15