无法设置phpmyadmin

时间:2019-05-20 16:30:20

标签: docker

我正在尝试在docker中设置phpmyadmin,但出现错误

version: "3.5"
services:
  mysql:
    image: mysql:5.7
    container_name: mysql
    networks:
      - ekb-urist
    environment:
      - MYSQL_DATABASE=ekb-urist
      - MYSQL_ROOT_PASSWORD=password
      - MYSQL_USER=ekb-urist
      - MYSQL_PASSWORD=password
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    links:
      - mysql
    ports:
      - "8082:80"
    depends_on:
      - mysql
    environment:
      MYSQL_USERNAME: ekb-urist
      MYSQL_ROOT_PASSWORD: password
      PMA_HOST: mysql
networks:
  ekb-urist:
    driver: bridge

mysqli_real_connect():php_network_getaddresses:getaddrinfo失败:名称无法解析  mysqli_real_connect():( HY000 / 2002):php_network_getaddresses:getaddrinfo失败:名称无法解析

1 个答案:

答案 0 :(得分:1)

添加

networks:
  - ekb-urist

进入phpmyadmin:的{​​{1}}部分