我有java程序试图连接到我的本地机器上运行的postgres数据库

时间:2017-09-30 22:41:15

标签: postgresql

我收到以下错误: org.postgresql.util.PSQLException:致命:用户密码验证失败" postgres" 这就是我的pg_hba.conf像

那样的东西
local   all             all                                     trust
# 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

此外,我已使用用户postgres

从命令行成功登录

我在MAC上使用pgAdmin 4.

0 个答案:

没有答案