Skip to content

Slow query log no such file or directory #574

@phknot

Description

@phknot

When mysql_slow_query_log_enabled: true is set, the setup of a new MariaDB server fails with error:

TASK [geerlingguy.mysql : Create slow query log file (if configured).] *********
fatal: [peters-zandbak]: FAILED! => {"changed": true, "cmd": ["touch", "/var/log/mysql/mariadb-slow.log"], "delta": "0:00:00.004930", "end": "2025-05-22 10:35:32.806447", "msg": "non-zero return code", "rc": 1, "start": "2025-05-22 10:35:32.801517", "stderr": "touch: cannot touch '/var/log/mysql/mariadb-slow.log': No such file or directory", "stderr_lines": ["touch: cannot touch '/var/log/mysql/mariadb-slow.log': No such file or directory"], "stdout": "", "stdout_lines": []}

I checked my server and it seems there is no mysql directory in /var/log. Probably an mkdir step is needed to create this beforehand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions