Skip to content

Instantly share code, notes, and snippets.

@proclaim
Created November 2, 2021 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save proclaim/f58a8cc0458bf96f3b49e537423e4881 to your computer and use it in GitHub Desktop.
Save proclaim/f58a8cc0458bf96f3b49e537423e4881 to your computer and use it in GitHub Desktop.
MySQL docker compose file
version: '3.1'
services:
mysql:
image: mysql:latest
container_name: mysql
# this is the maigc for login
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_DATABASE: 'db'
MYSQL_USER: 'user'
MYSQL_PASSWORD: 'password'
MYSQL_ROOT_PASSWORD: 'password'
ports:
- '3306:3306'
expose:
- '3306'
volumes:
- my-db:/var/lib/mysql
volumes:
my-db:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment