Docker 1.9.1 – ERROR 2005 (HY000): Unknown MySQL server host

We have a two docker setup, one is running a django app and the other running MySQL. Earlier we were using docker 1.8.3 and everything was working fine, after upgrading to 1.9.1 we are facing this issue.

We are creating a MySQL docker:

  • How to run a shell script using dockerfiles CMD
  • How will a server running multiple Docker virtual machines handle the TCP limitation?
  • Running several apps via docker-compose
  • Elastic Beanstalk Multi-Container Environment cannot mount fuse mount as docker volume
  • dockerfile - Unable to connect error
  • How can I run specific android app automatically by using Docker?
  • docker run --name <mysql docker name> -e MYSQL_ROOT_PASSWORD={} -d mysql:5.5.44

    Next we are running a batchfile, which is nothing but creating a DB, granting access to the user

    docker run -it --rm -v <setup_file>:/mnt mysql:5.5.44 sh -c 'exec mysql -h"<db server name>" -P"3306" -uroot -p"<password>" < /mnt/batchfile'

    Next we are creating the django docker

    docker run --name <django server name> --link <db server name> -it --rm ubuntu /bin/bash

    When the django docker comes up we get the error message

    ERROR 2005 (HY000): Unknown MySQL server host <DB server> (0)

    Is there any additional parameter that we need to send for docker 1.9.1?

  • Connecting to percona docker from a java docker container
  • Docker cp: Error response from daemon: lstat no such file or directory
  • .NET Core 1.1, Docker Build encounters Couldn't find 'project.json' with csproj
  • Running rails migrations in docker container sometimes results in ActiveRecord::DuplicateMigrationNameError
  • Docker image lifecycle for a java-based app
  • Moving a Docker node to a different Azure account
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.