Access to MYSQL logs

Hi, I want to use percona toolkit. This need Access to Slow-query.log

How I can do this?

I try set log in to /var/log/mysql but docker filé because creation folders fail.

Must create own docker filé for MySQL?
Or can use percona toolkit in other docker container…
Thank You in advance
Vasekk

You can configure any MySQL flavour via the configuration directories. See documentation here: https://devilbox.readthedocs.io/en/latest/configuration-files/my-cnf.html

Yes I can set logging in *.cfn file

But mysql container doesnot mount any accesable volume.
This means I must change docker-compose.yml

I try this:
1, mount percona volume to my container with installed percona tools ( bellow is test in php container:
#Mount db logs

  • devilbox-percona-5.7:/var/percona:rw${MOUNT_OPTIONS}
    But I cannot read files:
    devilbox@php-7.2.33 in /shared/httpd $ cat /var/percona/mysql-slow.log
    cat: /var/percona/mysql-slow.log: Permission denied.

2, Mount mysql into devilbox/data - this is old way of devlil box mount mysql i thing this is not good
# Mount MySQL Data directory
#- devilbox-{MYSQL_SERVER}:/var/lib/mysql:rw{MOUNT_OPTIONS}
- {DEVILBOX_PATH}/data/mysql-{MYSQL_SERVER}:/var/lib/mysql:rw${MOUNT_OPTIONS}

I dont want change docker-compose.yml, but there is no way i thing without change docker-compose.yml

The mysql slow log file would not be in the PHP container, but in the MySQL container.