
[英]PG::ConnectionBad: FATAL: password authentication failed for user
[英]PG::ConnectionBad (FATAL: password authentication failed for user ) on rails s and DBeaver
為什么在運行“rails s”並嘗試通過 DBeaver 訪問數據庫時出現此錯誤? 它昨天在 DBeaver 上以相同的憑據運行。
我的 pg_hba.conf 文件看起來像這樣,“peer”沒有在任何地方設置為方法,我嘗試過“md5”:
# "local" is for Unix domain socket connections only local all all scram-sha-256 # IPv4 local connections: host all all 127.0.0.1/32 scram-sha-256 # IPv6 local connections: host all all::1/128 scram-sha-256 # Allow replication connections from localhost, by a user with the # replication privilege. local replication all scram-sha-256 host replication all 127.0.0.1/32 scram-sha-256 host replication all::1/128 scram-sha-256
如果我嘗試使用 psql -U 用戶名 -W 登錄,我輸入我的密碼然后看到這個:
psql: error: FATAL: Peer authentication failed for user "ryalto"
憑證都是正確的,我也試過“sudo service postgresql restart”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.