Hi.
I set this line in a .cnf
file in the /etc/my.cnf.d
directory:
general_log_file=/tmp/mariadb.log
MariaDB runs without issues, but the file /tmp/mariadb.log
is hidden, can’t be listed nor accessed by any user (even root), but it exists, and can be accessed using the MariaDB /proc
directory entry:
# ls -fl /proc/`pidof /usr/bin/mariadbd`/fd | grep mariadb.log
l-wx------ 1 mysql mysql 64 ago 26 11:49 13 -> /tmp/mariadb.log
# tail /proc/`pidof /usr/bin/mariadbd`/fd/13 -n 2
210826 11:55:08 26 Connect root@localhost on galileo using Socket
26 Quit
But, if I use just mariadb.log
as the log file (a relative path), the file is created in the MariaDB data directory, and it works fine.
Also, if I run the daemon directly (from bash
), the file is created in /tmp
as expected. So I assume is a thing from systemd.
How can I fix this?
Thanks!