简体   繁体   English

Docker 容器内的 pgadmin4 未登录

[英]pgadmin4 inside a Docker container doesn't login

when i tried to login in pgadmin4 with this credentials当我尝试使用此凭据登录 pgadmin4 时

i get this error我得到这个错误

Unable to connect to server:无法连接到服务器:

connection to server at "db" (172.18.0.3), port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections?连接到“db”(172.18.0.3)的服务器,端口 5432 失败:连接被拒绝 服务器是否在该主机上运行并接受 TCP/IP 连接? 在此处输入图像描述 在此处输入图像描述 在此处输入图像描述

You should change the hostname in your server registration page to localhost .您应该将服务器注册页面中的主机名更改为localhost This is because container name is only accessible from other containers within the same docker user defined network.这是因为容器名称只能从同一 docker 用户定义网络中的其他容器访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM