K
K
Kyber_Ded2021-11-23 18:27:18
Docker
Kyber_Ded, 2021-11-23 18:27:18

Why won't PMA let me connect?

docker-compose

#MySQL Service
  mysql:
    image: mysql:5.7.22
    container_name: mysql
    restart: unless-stopped
    tty: true
    ports:
      - "3306:3306"
    environment:
      MYSQL_DATABASE: test
      MYSQL_ROOT_PASSWORD: 12345
      SERVICE_TAGS: dev
      SERVICE_NAME: mysql
    volumes:
      - dbdata:/var/lib/mysql
      - ./docker/mysql/my.cnf:/etc/mysql/my.cnf
    networks:
      - app-network

  #PhpMyAdmin субд
  phpmyadmin:
    image: phpmyadmin/phpmyadmin:5.1.1
    restart: always
    links:
      - mysql
    environment:
      MYSQL_USERNAME: root
      MYSQL_ROOT_PASSWORD: 12345
      PMA_HOST: mysql
    ports:
      - 8082:80

when trying to login as root 12345
619d0845223cc404693864.png

Everything seems to be correct with the host

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2021-11-23
@Kyber_Ded

Pma and mysql on different networks. pma should have the same

networks:
      - app-network

Or another network shared with mysql

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question