title: Connect to a mysql server running in a docker container from another container?
body: <p>I have two containers; a node.js server, and a mysql server ...</p>
  <p>Both are running fine, I'm trying to connect to the database running in the MySQL container from my node app.</p>
  <p>I've created a bridge network:</p>
  <pre><code>$ docker network create -d bridge mynetwork
  </code></pre>
  <p>and run both of my containers in this network with:</p>
  <pre><code>$ docker run -p 32031:3306 --network mynetwork  --name mysql  -e MYSQL_ROOT_PASSWORD=abc123 -d mysql:5.7
  
  $ docker run -p 3000:3000 --network mynetwork  node-server node index.js
  </code></pre>
  <p>I'm trying to connect with the IP of the mysql container that I found with <code>docker inspect mysql</code>, which is <code>172.18.0.2</code> and port <code>32031</code>.</p>
  <p>Where did it go wrong, it's not connecting?</p>