Last active
April 10, 2024 00:42
-
-
Save crazyoptimist/96ecaccf93d21dc08e4bdf36b03dffdd to your computer and use it in GitHub Desktop.
MySQL 8 with Docker Compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: mysql | |
services: | |
mysql: | |
image: mysql:8 | |
container_name: mysql | |
ports: | |
- "3306:3306" | |
command: | |
[ | |
"--character-set-server=utf8mb4", | |
"--collation-server=utf8mb4_0900_ai_ci", | |
] | |
volumes: | |
- "mysql_data:/var/lib/mysql" | |
- "./custom.cnf:/etc/mysql/conf.d/custom.cnf" | |
environment: | |
MYSQL_ROOT_PASSWORD: root**pass | |
MYSQL_DATABASE: devdb | |
MYSQL_USER: user | |
MYSQL_PASSWORD: youmayneverguess | |
restart: on-failure | |
phpmyadmin: | |
image: phpmyadmin | |
ports: | |
- 9000:80 | |
environment: | |
- PMA_HOST=mysql | |
- PMA_USER=root | |
- PMA_PASSWORD=root**pass | |
depends_on: | |
- mysql | |
restart: on-failure | |
volumes: | |
mysql_data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
# Can be 1, 2, 3 | |
log_error_verbosity=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment