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:

  • Rancher template - Hadoop Illegal character in host-name
  • Can't interact with java process when attaching
  • ElasticBeanstalk: storing a bullet proof docker container
  • Docker image for windows components
  • Disable SSH access from docker container to it's host
  • boot2docker behind proxy - certificate signed by unknown authority
  • 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?

  • How to pass -mem to dockerized Play application
  • Docker run, no space left on device
  • Deploy local repo to Docker container without building image
  • “org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean” Using docker
  • Is there a way to detect programmatically whether a Docker container is running natively or using Docker Machine?
  • Install cron tasks in a docker run command
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.