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

  • Python script to add data to postgres docker container runs multiple times
  • Running a Bash Script from (on Docker Container B) from Docker Container A
  • Deploying a cluster (i.e. MongoDb / ElasticSearch) with Docker and linking to Java Application
  • Does docker created `docker` systemd-slice without `.slice` suffix?
  • New NodeJS Error Thrown While Running mupx deploy
  • Why is the Kafka distributed connector dying when the node I created it on is killed?
  • AWS ECS Error when running task: No Container Instances were found in your cluster
  • Volume with variable host location in Docker Compose
  • PHP-CLI Docker with extension
  • linux source command not working when building Dockerfile
  • Docker diff isn't showing changes to new files
  • Logging output in Docker Quickstart Terminal
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.