Docker – MySQL containers on using the same volume of a data-only container

Currently, I’m trying to figure out on how to run multiple MySQL containers that uses the same volume from a data-only container. After running the first one and successfully created my database and records in there, I tried to run another new MySQL container and faced this error:

Lost connection to MySQL server at 'reading initial communication packet', system error: 0

I have mapped different ports to host 3306 using the containers. What’s the problem? o.O

  • With commited DOCKER container, the new container failed to run TOMCAT9 in Raspberry PI 3
  • Filter docker images by name
  • Docker max depth exceeded
  • Using Python 3 time.sleep in Raspberry Pi 3 hangs process
  • Ensure node is running at least a certain kernel version?
  • Variable substitution in docker-compose.yml file when running docker-compose with sudo
  • Linking containers between task definitions in AWS ECS?
  • How to run Docker for Mac without TLS?
  • Elastic Beanstalk Multicontainer Docker Environments: redirect requests between 2 APIs
  • Docker - Can't access MySQL CLI in container
  • How to access lower layer files in docker?
  • logstash configuration to execute a command to elastic search
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.