【问题标题】:Unable to connect to server pgadmin4无法连接到服务器 pgadmin4
【发布时间】:2020-05-05 17:23:01
【问题描述】:

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

配置:

postgres 12

centos 7

pgadmin 4

我明白了

could not connect to server: Permission denied
Is the server running on host "localhost" (::1) and accepting    
TCP/IP connections on port 5432?
could not connect to server: Permission denied
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?

每个

SHOW listen_addresses;
listen_addresses 
------------------
localhost

我可以通过 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

How connect Postgres to localhost server using pgAdmin on Ubuntu?

psql (12.1, 服务器 9.2.24) 输入“帮助”以获得帮助。

postgres=# 
postgres=# alter user postgres with password 'postgres';
ALTER ROLE
postgres=# 

还有

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

【问题讨论】:

    标签: postgresql pgadmin pgadmin-4


    【解决方案1】:

    使用“ifconfig” cmd 查找名称为 dock0 的真实 docker ip。

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

    【讨论】:

    • 或者你可以尝试“host.docker.internal”,它是与登录用户名相同的真实docker IP。
    猜你喜欢
    • 1970-01-01
    • 2021-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-08
    • 2020-01-24
    • 1970-01-01
    • 2021-07-03
    相关资源
    最近更新 更多