title: phpmyadmin can't connect to mariadb with docker-compose: Packets out of order
body: <p>So whats wrong with this docker-compose.yml? It actually looks ok to me.  </p>
  
  <p>But when i try to log in to phpmyadmin on <a href="http://localhost:8080/index.php" rel="nofollow noreferrer">http://localhost:8080/index.php</a>
  i get errors:</p>
  
  <blockquote>
    <p>Packets out of order. Expected 0 received 1. Packet size=71<br>
    mysqli_real_connect(): MySQL server has gone away<br>
    mysqli_real_connect(): Error while reading greeting packet. PID=33<br>
    mysqli_real_connect(): (HY000/2006): MySQL server has gone away</p>
  </blockquote>
  
  <pre><code>version: "3"
  services:
    db:
      image: mariadb:10.4
      volumes:
        - test_db_data:/var/lib/mysql
      ports:
        - "3306:3306"
      environment:
        MYSQL_DATABASE: test
        MYSQL_USER: test
        MYSQL_PASSWORD: test
        MYSQL_ROOT_PASSWORD: root
      networks:
          - dbtest
  
    pma:
      image: phpmyadmin/phpmyadmin
      depends_on:
        - db
      ports:
        - 8080:80
      environment:
        - PMA_HOST=db
      networks:
          - dbtest
  
    adminer:
      image: adminer
      restart: unless-stopped
      ports:
        - 8081:8080
      networks:
        - dbtest
  
  volumes:
    test_db_data:
  networks:
    dbtest:
  </code></pre>
  
  <p>Context:  </p>
  
  <ul>
  <li>Docker version 19.03.3 </li>
  <li>docker-compose version 1.23.2</li>
  </ul>
  
  <p><strong>Update:</strong><br>
  I added adminer as well and login also fails.
  Mysql stderr shows:</p>
  
  <blockquote>
    <p>[Warning] Aborted connection 9 to db: 'unconnected' user: 'unauthenticated' host: '192.168.32.3' (This connection closed normally without authentication)</p>
  </blockquote>