Docker: mysql5

In order to create a local mysql5 server with adminer web-addon:

  1. Create a file mysql.yaml:
# Use root/example as user/password credentials
version: '3'

services:

  db:
    image: mysql:5
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    volumes:
      - ./data:/var/lib/mysql
    ports: 
      - 3306:3306
    environment:
      MYSQL_ROOT_PASSWORD: example


  adminer:
    image: adminer
    restart: always
    ports:
      - 8080:8080

Use docker-compose to install:

sudo docker-compose -f mysql.yaml up

Open browser at localhost:8080 using username/passwort root/example

References: