Skip to content

Instantly share code, notes, and snippets.

@md-nasir
Last active February 11, 2020 04:42
Show Gist options
  • Select an option

  • Save md-nasir/39463b659d27e3704130aad25ff02a2b to your computer and use it in GitHub Desktop.

Select an option

Save md-nasir/39463b659d27e3704130aad25ff02a2b to your computer and use it in GitHub Desktop.
Customize MySQL image in Docker as your needs.
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=""'
#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