无法连接到服务器:连接被拒绝(0x0000274D / 10061)服务器是否在主机“ localhost”上运行

时间:2020-07-07 08:38:05

标签: postgresql pgadmin-4

通过pgAdmin访问Postgres数据库时出现此错误。

我已经将方法设置为“信任”

# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
host    replication     all             127.0.0.1/32            trust
host    replication     all             ::1/128                 trust

enter image description here

1 个答案:

答案 0 :(得分:0)

在端口(8888)上,您似乎正在尝试连接到Web服务器。默认情况下,Postgres在端口5432上运行,如果没有,则通常在54 **范围内。验证端口Postgres在哪个端口上运行。我将从postgresql.conf中设置的端口开始。您没有说您正在使用什么操作系统,所以我无法提供命令来检查监听端口。