There seems to be another problem with docker on win.

just write a simple mysql service

< H1 > docker-compose.yml < / H1 >
version: "3"
services:
  mysql:
    image: mysql:5.7
    volumes:
      - ./mysql/data:/var/lib/mysql
      - ./mysql/my.cnf:/etc/mysql/conf.d/my.cnf
    ports: 
      - 3306:3306
    environment:
      - MYSQL_ROOT_PASSWORD=STi7hXedIfgdjxnRgJ

but the my.cnf of the current directory cannot be read. It"s strange that some time ago, this configuration is all possible.
I tried it on linux, and it was OK (in my.cnf, I changed the port to 3307)
Linux:

Win

PS:Share disk also got

< H1 > my.cnf < / H1 >
[mysqld]
port=3307
explicit_defaults_for_timestamp=1
max_allowed_packet = 20M
innodb_buffer_pool_size=200M
server-id=344

after my test, I found that disk C must also contribute:

it is estimated that disk C also needs a lot of things

Menu