title: running mysql server and phpmyadmin in docker containers
body: <p>I spin up a docker container for <code>MySQL server</code> </p>
  
  <pre><code>docker run --detach --name=mysql_db_server --env="MYSQL_ROOT_PASSWORD=password" mysql
  </code></pre>
  
  <p>Then I run another container for <code>phpmyadmin</code> that is linked to <code>MySQL server</code> as follows</p>
  
  <pre><code>docker run --name myadmin -d --link mysql_db_server:mysql -p 8080:80 phpmyadmin/phpmyadmin
  </code></pre>
  
  <p>I am able to see <code>phpmyadmin</code> on <code>http://localhost:8080</code> but I am not able to log into it using either </p>
  
  <p><code>root</code>  --- <code>password</code> or 
  <code>admin</code> --- <code>password</code></p>
  
  <p><a href="https://i.stack.imgur.com/OhARB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OhARB.png" alt="myphpadmin login"></a></p>
  
  <p><code>$docker ps -a</code></p>
  
  <p>output </p>
  
  <pre><code>CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS                  NAMES
  85e68b8bab30        phpmyadmin/phpmyadmin   "/run.sh phpmyadmin"     3 hours ago         Up 3 hours          0.0.0.0:8080-&gt;80/tcp   myadmin
  b4d130cdb230        mysql                   "docker-entrypoint.s…"   3 hours ago         Up 3 hours          3306/tcp               mysql_db_server
  </code></pre>
  
  <p>What am I doing wrong?</p>