In case you are having problem with a set of Docker containers, then make sure that you do not only EXPOSE
the port 3306
, but as well map the port from outside the container -p 3306:3306
. For docker-compose.yml
:
version: '2'
services:
mdb:
image: mariadb:10.1
ports:
- "3306:3306"
…