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

  • Expose mongo port in other container
  • What does Kubernetes actually do? [closed]
  • Docker - few containers
  • How to get the Docker version using the Remote API
  • How to edit files in docker for scrapinghub portia
  • Rancher: always deploying to new stack
  • How to remove all tags for a docker repository locally?
  • Deploying a .NET Core Web API using Docker on Elastic Beanstalk
  • Docker-Compose - Restart my reverse proxy automatically in case of image update
  • rsync files from inside a docker container?
  • ./configure: error: the HTTP gzip module requires the zlib library
  • How to connect to a docker container from the outside world
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.