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:

  • Edit configuration file for running Docker instance of Kong
  • Running Docker pull command in Dockerfile
  • Updating docker images with small changes using commits
  • SSH Agent forwarding inside docker compose container
  • Mac OS X Docker baseline aspnet error: libdl not found
  • Could I use docker or something similar to deploy windows application?
  • 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?

  • boot2docker / docker “Error. image library/.:latest not found”
  • Access service on subdomain in Kubernetes
  • Improve Spring-Boot startup in Docker
  • How to debug a rails app in docker with pry?
  • Docker container transfer using LFS properties
  • Why orientDB connection to localhost of docker is refused
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.