postgresql - 升级到 scram-sha-256 密码验证后从 pgadmin 连接
问题描述
我正在尝试为密码身份验证配置 scram-sha-256。我将 postgresql.conf 更改为:
password_encryption = scram-sha-256
我升级了密码,\password
然后将 pg_hba.conf 更改为:
local all all scram-sha-256
尽我所能启动 postgres 并使用升级后的密码从 psql 连接。
但是,我无法从 PGadmin 登录,即使在我的 postgresql.conf 中它配置为:
listen_addresses = '*'
我收到此错误:
致命:用户“postgres”的密码验证失败
如果我尝试在 pg_hba.conf 中更改为:
host all all all scram-sha-256
然后 postgres start 失败:
2020-01-02 11:54:17.046 IST [1] CONTEXT: line 85 of configuration file "/var/lib/postgresql/data/pg_hba.conf"
2020-01-02 11:54:17.046 IST [1] FATAL: could not load pg_hba.conf
那么从 pgadmin 启用 scram-sha-256 和连接的正确方法是什么?
解决方案
推荐阅读
- html - 如何使css div子宽度适合div父级
- python - 在未来的 matplotlib 中不推荐使用 cross_from_above ... 替换功能?
- java - 在jpa hibernate5 spring4中的光标上返回一个列类型光标
- android - 带有 recyclerView 的 PagingLibrary 无法停止 loadAfter()
- php - 有没有办法获取当前接受的 Lyft 乘车请求信息以及乘客信息?
- javascript - JSON 中的可变 JSON 值/方法
- python - Python - 用音频openCV播放无限视频,卡在音频上
- r - 非结构化表格到窄格式表格的转换?
- reactjs - 没有空格的文本输入?
- ruby - Ruby Chipmunk 从太空中移除物体