title: #2002 getaddrinfo failed - phpmyadmin using docker container
body: <p>i'm trying to connect phpmyadmin with mysql database through docker containers</p>
  <p>I have the following docker-compose.yml file</p>
  <pre><code>version: &quot;3&quot;
  services:
  database:
  image: mysql:latest
  container_name: locations-service-mysql
  environment:
    MYSQL_ROOT_PASSWORD: root
    MYSQL_ALLOW_EMPTY_PASSWORD: &quot;yes&quot;
  
  volumes:
    - ./mysql-init:/var/lib/mysql:rw
    - ./mysql-init/locations_schema.sql:/docker-entrypoint-
      initdb.d/locations_schema.sql:ro
  
  
   phpmyadmin:
     image: phpmyadmin/phpmyadmin:latest
     ports:
    - 8181:80
  environment:
    MYSQL_USERNAME: root
    MYSQL_ROOT_PASSWORD: examplepass
    PMA_HOST: database
  
  
  dropwizard:
  build: ../locations-service/
  ports:
        - 8080:8080
        - 8081:8081
        - 5005:5005
  depends_on:
        - database
  container_name: locations-service
  </code></pre>
  <p>I tried to log in to PMA using root account and the given password: blabla.
  I receive the following error:</p>
  <h1>2002 - php_network_getaddresses: getaddrinfo failed: Name does not resolve — The server is not responding (or the local server's socket is not correctly configured).</h1>