容器技术交流

 找回密码
 立即注册
查看: 57|回复: 1

docker容器连接mysql的问题困扰了很久 什么解决

[复制链接]
发表于 2020-8-24 15:31:28 | 显示全部楼层 |阅读模式
现在我允许了2个容器,一个跑mysql,一个跑了api接口, 他们在同一个 bridge 中, 容器之间可以相互ping同 但是api容器连不上mysql数据库,提示 A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 35 - An internal exception was caught)

有大佬知道是什么原因吗?怎么解决,已经被困扰1个星期了
发表于 2020-9-8 18:13:18 | 显示全部楼层
端口的问题?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|URLOS ( 粤ICP备18087780号 )

GMT+8, 2020-10-31 11:40 , Processed in 0.046715 second(s), 17 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表