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:

  • default 'docker run' options?
  • Is there a way to backup my docker environment
  • Can't access docker image from EC2 server
  • Hadoop and Cassandra benchmarking
  • initdb: could not change permissions of directory on Postgresql container
  • How to tell Docker to use dm/LVM backend for volumes instead of vfs
  • 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 continue running scripts when exiting docker containers
  • Docker for windows not working after install
  • Post a Json file to elasticsearch running on Docker, Kitematic on Windows 10
  • Creating a CI pipeline for .net containerized applications
  • How to use env var in WORKDIR stanza?
  • docker-compose up : Encountered errors while bringing up the project
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.