前置条件:

mysql in docker

mysql:
  image: mysql/mysql-server
  ports:
    - "9527:3306"
  environment:
    - MYSQL_ROOT_PASSWORD=MyRootPassword
    - MYSQL_USER=great
    - MYSQL_PASSWORD=GreatPassword
  volumes:
    - "./datadir:/var/lib/mysql"