Skip to the content.
Home Alpine Linux Docker S3CMD Go System Security MySQL InfluxDB
	mkdir -p ~/docker/etc/mysql/conf.d
	mkdir -p ~/docker/var/lib/mysql
	nano ~/docker/mysql.yml
version: '2'
services:
  mysql:
    image: mysql:5.7.23
    command: --default-authentication-plugin=mysql_native_password
    restart: on-failure
    environment:
      MYSQL_ROOT_PASSWORD: 123456
      TZ: Asia/Kolkata
    ports:
      - 3306:3306
      - 33060:33060
    volumes:
      - /<path>/<to>/docker/etc/mysql/conf.d:/etc/mysql/conf.d
      - /<path>/<to>/docker/var/lib/mysql:/var/lib/mysql
    container_name: ddb001
	nano ~/docker/etc/mysql/conf.d/my.cnf
[mysqld]
bind-address = 0.0.0.0
skip-log-bin
sql_mode = NO_ENGINE_SUBSTITUTION
# Cf. https://dba.stackexchange.com/q/5666/62861
innodb_file_per_table = ON
innodb_flush_log_at_trx_commit = 2
	docker-compose -f ~/docker/mysql.yml up
	docker-compose -f ~/docker/mysql.yml up -d