如何在OS X Yosemite中重置PostgreSQL / pgAdminIII密码?

时间:2015-04-26 14:13:05

标签: macos postgresql

我的朋友正试图在运行OS X Yosemite的iMac上登录pgAdminIII。他的机器上有两个版本的PostgreSQL:8.4和9.4。他丢失了密码。如何重置pgAdminIII密码?

1 个答案:

答案 0 :(得分:0)

我们在pg_hba.conf文件中没有以下行:

local   all         postgres

所以我不知道在哪里放线:

local   all         postgres                          trust same user

“信任同一个用户”在哪一栏进行?

这是他的pg_hba.conf文件底部的内容:

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "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                                md5
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5