I have two servers in one network.

  1. netmask
  2. netmask

On second server I start MySQL using Docker Compose.

docker ps
CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS                   PORTS                                                   NAMES
dec33e6c66fe        mysql/mysql-cluster   "/entrypoint.sh mysq…"   2 hours ago         Up 2 hours (healthy)     1186/tcp, 2202/tcp, 33060/tcp,>3306/tcp   ndb_ndb_mysqld_1
56ccfd399288        mysql/mysql-cluster   "/entrypoint.sh ndbd"    2 hours ago         Up 2 hours (unhealthy)   1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp                 ndb_ndb_data_node_1_1
1f6a2f2db72c        mysql/mysql-cluster   "/entrypoint.sh ndb_…"   2 hours ago         Up 2 hours (unhealthy)   2202/tcp, 3306/tcp,>1186/tcp, 33060/tcp   ndb_ndb_mgmd_1

netstat -nta
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0    *               LISTEN     
tcp        0      0      ESTABLISHED
tcp        0     36      ESTABLISHED
tcp6       0      0 :::3306                 :::*                    LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 :::1186                 :::*                    LISTEN

Port 3306 open. On second server ( I try:

telnet 3306
Connected to
Escape character is '^]'.

Access is and everything is available.

But when I try to do the same from the first server (from, I get connection timeout:

telnet 3306
telnet: connect to address Connection timed out
[oracle@host-192-168-202-5 ~]$ 

But at the same time on port 22 I can connect. I tried disabling Iptables, but it didn't help. I can not understand why this is happening and where to look for more information?

I use OracleLinux7.

uname -a
Linux host-192-168-202-5 3.8.13-118.6.1.el7uek.x86_64
  • I don't have a lot of docker knowledge, but it's been my experience that you cannot normally make a connection from docker A to docker B using the external docker IPs. Each docker container should also be running within the docker network and those IPs should allow for intra-container communication. Otherwise, you'd have to create a new docker network and launch both containers inside that network to have docker-docker communication available. – utdrmac Jul 16 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.