docker-compose.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 |
db: image: mysql:8 container_name: db restart: always environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: test ports: - "13306:3306" volumes: - ./data/db:/var/lib/mysql - ./data/db/log:/var/log/ - ./my.cnf:/etc/mysql/conf.d/my.cnf |
my.cnf
1 2 3 4 |
[mysqld] log_output=FILE general_log=1 general_log_file=/var/log/general.log |