无法连接到sql server

问题描述 投票:0回答:1

尝试连接到SQL Server失败。端口似乎无法访问。

docker container ... 0.0.0.0:15106->3306/tcp

SQL在3306上运行。在Docker容器中:

state       Recv-Q Send-Q                                                 Local Address:Port                                                                Peer Address:Port
LISTEN      0      80                                                         127.0.0.1:3306                                                                           *:*

在服务器上:

sudo netstat -tnlp | grep :15106
tcp6       0      0 :::15106                :::*                    LISTEN      30494/docker-proxy

授予所有授权,但无法建立连接。

Error connecting to database: (using class org.gjt.mm.mysql.Driver)
telnet [ip] 15106
Connection refused
mysql docker database-connection firewall
1个回答
0
投票

您应该在qazxsw poi环境变量中指定MySQL主机。您还应该使用qazxsw poi来指定服务器的端口,因为它可能不是默认端口。

PMA_HOST

资料来源:PMA_PORT

© www.soinside.com 2019 - 2024. All rights reserved.