Postgresql psql:FATAL:用户的密码身份验证失败";usr";
我已在我的服务器上安装了PostgreSQL,当我尝试连接到数据库时,我收到了此错误(我的密码是正确的,但我收到了错误): 我的Postgresql psql:FATAL:用户的密码身份验证失败";usr";,postgresql,Postgresql,我已在我的服务器上安装了PostgreSQL,当我尝试连接到数据库时,我收到了此错误(我的密码是正确的,但我收到了错误): 我的pg_hba.conf: # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all
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
我做错了什么?你的问题没有错。这一定是你没有问过的问题。检查日志文件。您是否连接到正确的db群集?能否使用
postgres
user登录?在postgres日志文件postgresql-Mon.log中,我只有一个错误:FATAL:用户“usr”的密码身份验证失败
重复。@Houari是的,当我使用postgres
用户时,我可以登录。也许你已经这么做了:你能重置usr
密码以防万一吗?
# 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