0

コマンドライン経由で接続できますが、pgadmin3 で通常のエラー メッセージが表示されます。

Error connecting to the server: FATAL: password authentication failed for user "postgres"

(そしてlogin failedphppgadminで)

これについていくつかの質問があることは知っていますが、コマンドラインの成功/ pgadmin3の失敗に対処しているものはありません.

次のような提案された変更を行いました。

追加listen_addresses = '*'するpostgresql.conf

また、次のように末尾の行を変更pg_hba.confします (ピアから md5 に切り替えるため):

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

さらに、次の方法での接続は失敗します。

psql -h localhost -U postgres -d postgres

(パスワードの失敗) ただし、次のような接続は成功します。 sudo -u postgres psql Password: ****

4

1 に答える 1