问题描述
阅读类似的问题和答案,但找不到适用于版本13的有效解决方案。
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"
我的/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
解决方法
重启计算机后,该问题就可以通过我上传的配置解决。