postgresql - PostgreSQL 13 FATAL:用户“postgres”的密码验证失败
问题描述
我在安装过程中输入了正确的密码,出现如下所示的身份验证错误。
阅读类似的问题和答案,但找不到版本 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
解决方案
一旦我重新启动计算机,它就会通过我上传的配置得到解决。
推荐阅读
- google-bigquery - 如何将负载均衡器日志实时导出到 BigQuery?
- typescript - 在 TypeScript 中的对象内查找类型
- python - 如何让 CTE 在我的 python 代码中工作?
- javascript - 使用媒体源扩展 API 的交互式视频
- javascript - 未捕获的类型错误:无法设置未定义的属性“显示”-如何在我的模态 JS 代码中修复它?
- javascript - 角度 $compile 后在 $scope 中找不到方法
- python - 基于现有单元格填充单元格
- angular - 如何围绕仅重命名组件选择器的 Angular 组件创建包装器?
- python-3.x - 如何从只存在一次的熊猫数据框中过滤掉值
- c# - Url.Content(null) MVC 5 返回一个链接