Unverified50% confidenceFactExact time
When Dify is started via Docker Compose it creates an independent bridge network, and localhost inside a container points to the container itself; when MySQL is installed on the Windows host, the Dify container needs to use host.docker.internal rather than 127.0.0.1 to access the host.
1
Sources
50%
Confidence
Long-term
Relevance
10/18/2026
First Seen
Sources
Related Entities
Related Claims
UnverifiedWhen a container accesses MySQL on a Windows host, host.docker.internal must be used instead of localhost.79% similarUnverified由于Docker默认创建的bridge网络允许容器间及容器与宿主机自由通信,Dify容器可与本机MySQL或VMware虚拟机内环境正常通信78% similarUnverifiedWhen Dify runs inside a Docker container, localhost points to the interior of the container; the host machine's LAN IP or host.docker.internal (available on macOS/Windows) must be used to access the Ollama service on the host machine.75% similarUnverifiedDify 的 Agent 工具运行在容器内部,容器的 localhost 指向容器自身网络栈,无法直接通过 localhost 访问宿主机数据库服务,是数据库连接失败的根源73% similarUnverifiedWhen n8n runs as a Docker container, localhost no longer points to the host machine; common solutions include using host.docker.internal instead of localhost, or placing n8n and PostgreSQL on the same Docker network so they can reach each other by service name.70% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/1057556API
curl https://kongchang.com/api/v1/knowledge/claims/1057556MCP
get_claim(id=1057556)