[英]Unable to connect to server pgadmin4
When attempting to add a server (this is my first install)尝试添加服务器时(这是我的第一次安装)
Configuration:配置:
postgres 12 12
centos 7 Centos 7
pgadmin 4管理员 4
I get我得到
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?
per每
SHOW listen_addresses;
listen_addresses
------------------
localhost
I can network connect from psql我可以从 psql 网络连接
psql -h localhost aps19
psql (12.1, server 9.2.24)
Type "help" for help.
aps19=>
I am listening on port 5432我正在侦听端口 5432
I am able to make TCP connections from java from my localhost postgres>psql psql (12.1, server 9.2.24) Type "help" for help.我可以从我的本地主机 postgres>psql psql (12.1, server 9.2.24) 从 java 建立 TCP 连接 输入“help”以获得帮助。
xxx=> show port
xxx-> ;
port
------
5432
per How connect Postgres to localhost server using pgAdmin on Ubuntu? per 如何在 Ubuntu 上使用 pgAdmin 将 Postgres 连接到 localhost 服务器?
psql (12.1, server 9.2.24) Type "help" for help. psql (12.1, server 9.2.24) 输入“help”获取帮助。
postgres=#
postgres=# alter user postgres with password 'postgres';
ALTER ROLE
postgres=#
also还
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
use the "ifconfig" cmd to find real docker ip which name is dock0.使用“ifconfig”cmd 查找名称为dock0 的真实docker ip。
And then use it as username to login.然后使用它作为用户名登录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.