I want to mount a directory from host inside mysql container so that mysql would write its logs to that directory and I would be able to access those logs from host.
For this I am using the following volume configuration:
volumes:
- ./logs/mysql:/var/log/mysql
But as pointed out in this answer, there are permission issues between host user and container user. The solution there was to use named volumes, but what I want is to access those logs on host in a convenient directory. Not inside internal directories of docker.