I've a Galera Cluster Installation with three nodes. As requirement my MariaDB installation must be in different path that default, and user cannot be mysql
. So I've moved all mysql data path and I've created a new user and group to manage the mysql service.
MariaDB service is working fine, but I've noticed that a mysql-slow.log
has been created with permissions to mysql:root
for a third program installation that monitor queries. Opening mysql.err
I've found the following error:
[ERROR] Could not use mysql-slow.log for logging (error 13).Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.
So I've made chown myuser:mygroup mysql-slow.log
and restart the service, but there still having same permissions. Then I've set in my.cnf
the slow_query_log=1
, in order to try that the myuser create the file at start, but the wrong permission still there also after remove the files and restart.
All the files, in my mariadb data path, are not managed by mysql:mysql
user, in my installation are managed by myuser:mygroup
so when the mysql-slow.log
is created the permissions mysql:root
are assigned so I have not permission to write there with myuser:mygroup
and if I assign them manually there is not effect because are override with mysql:root
after mysql restart.
Somebody knows if there are any way to set by default the user and group owners of the mysql-slow.log file when created?
Thanks.
Regards,
Sergio