pgAdmin 4 无法连接到服务器:超时已过期

时间:2021-01-18 13:22:31

标签: postgresql remote-access remote-server pgadmin-4

我想通过远程服务器连接到 pgAdmin 4 数据库。但是,当我想保存连接属性时,我收到以下消息:

unable to connect to server: timeout expired

这是“pg_hba.conf”的内容:

# TYPE  DATABASE        USER            ADDRESS                 METHOD

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

“postgresql.conf”中的listen_addresses 也设置为'*'

我应该怎么做才能远程连接到服务器?

0 个答案:

没有答案