title: docker.io - Docker linking between application & database containers
body: <p>I am trying to use my Scala-Akka application with my MySQL database on two separate Docker containers. I found out that Docker allows developers to link their application to their databases with the flag named --link. In my Dockerfiles in which I've used to create my images, I have add in EXPOSE 3306 8080 to it.</p>
  
  <p>And this is how I run the containers:</p>
  
  <pre><code>docker run -d -p 3306:3306 --name mysql centos6mysql
  docker run -d -p 8080:8080 --name scalaapp --link mysql:db centos6scala
  </code></pre>
  
  <p>After running the containers, I used docker ps and I am able to see the active containers. However, It seems like the application container is not using the database from the MySQL container. Anyone know what's wrong?</p>