Postgresql 无法连接到服务器pgadmin4

Postgresql 无法连接到服务器pgadmin4,postgresql,pgadmin,pgadmin-4,Postgresql,Pgadmin,Pgadmin 4,尝试添加服务器时(这是我的第一次安装) 配置: 博士后12 centos 7 pgadmin 4 我明白了 我可以从psql进行网络连接 psql -h localhost aps19 psql (12.1, server 9.2.24) Type "help" for help. aps19=> 我正在收听5432端口 我能够从本地主机通过java建立TCP连接 postgres>psql psql(12.1,服务器9.2.24) 键入“帮助”以获取帮助 xxx=> sho

尝试添加服务器时(这是我的第一次安装)

配置:

博士后12

centos 7

pgadmin 4

我明白了

我可以从psql进行网络连接

psql -h localhost aps19
psql (12.1, server 9.2.24)
Type "help" for help.

aps19=> 
我正在收听5432端口

我能够从本地主机通过java建立TCP连接 postgres>psql psql(12.1,服务器9.2.24) 键入“帮助”以获取帮助

xxx=> show port   
xxx-> ;
port 
------
5432
postgres=# 
postgres=# alter user postgres with password 'postgres';
ALTER ROLE
postgres=# 

psql(12.1,服务器9.2.24) 键入“帮助”以获取帮助

xxx=> show port   
xxx-> ;
port 
------
5432
postgres=# 
postgres=# alter user postgres with password 'postgres';
ALTER ROLE
postgres=# 

使用“ifconfig”cmd查找名为dock0的实际docker ip

然后使用它作为用户名登录。

或者您可以尝试“host.docker.internal”,这与登录用户名的真实docker IP相同。
netstat -a | grep 5432
unix  2      [ ACC ]     STREAM     LISTENING     30611    /tmp/.s.PGSQL.5432
unix  2      [ ACC ]     STREAM     LISTENING     30602    /var/run/postgresql/.s.PGSQL.5432