Last active
February 11, 2020 04:42
-
-
Save md-nasir/39463b659d27e3704130aad25ff02a2b to your computer and use it in GitHub Desktop.
Customize MySQL image in Docker as your needs.
This file contains hidden or 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
| version: '3.0' | |
| services: | |
| database: | |
| container_name: custome_mysql | |
| image: mysql:8.0 | |
| volumes: | |
| #Custome file path ./docker/my.cnf | |
| #Mysql mysql file path /etc/mysql/my.cnf | |
| - './docker/my.cnf:/etc/mysql/my.cnf' | |
| environment: | |
| - MYSQL_ROOT_USER=root | |
| - MYSQL_DATABASE=robishop23 | |
| - MYSQL_ROOT_PASSWORD=root | |
| ports: | |
| - '3360:3306' | |
| command: '--sql_mode=""' |
This file contains hidden or 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
| #Existing code gose here | |
| ............. | |
| ............. | |
| #I added them to fix mysql_native_password issue. | |
| default-authentication-plugin=mysql_native_password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment