Skip to content

User not created in phpmyadmin when using docker-compose #392

Description

@sandwichdreams

When I run docker-compose up the container starts and I can log in with root, but no user named phpmyadmin is created. Is there something missing in the yml file?

version: "3.0"

networks:
    dev:

services:
  mariadb:
    image: mariadb:latest
    restart: always
    ports:
      - 3306:3306
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=example
      - MYSQL_USER=mariadb
      - MYSQL_PASSWORD=mariadb
    volumes:
      - /docker/mariadb:/var/lib/mysql
      - /etc/localtime:/etc/localtime:ro
    networks:
      - dev
 
  phpmyadmin:
    image: phpmyadmin:latest
    depends_on:
      - mariadb
    restart: always
    ports:
      - "8080:80"
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_USER=phpmyadmin
      - MYSQL_PASSWORD=phpmyadmin
      - PMA_HOST=mariadb
    volumes:
      - /etc/localtime:/etc/localtime:ro
    networks:
      - dev

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions