Skip to content

Instantly share code, notes, and snippets.

@mmitou
Created February 20, 2021 06:50
Show Gist options
  • Save mmitou/4b96d38167ebf968fec9dfd5975d625c to your computer and use it in GitHub Desktop.
Save mmitou/4b96d38167ebf968fec9dfd5975d625c to your computer and use it in GitHub Desktop.
version: '3'
services:
db:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_PORT: 3306
ports:
- 3306:3306
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
volumes:
- ./docker/db/data:/var/lib/mysql
- ./docker/db/my.cnf:/etc/mysql/conf.d/my.cnf
- ./docker/db/sql:/docker-entrypoint-initdb.d
# mysql -h 127.0.0.1 -u root -proot -D database-name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment