The server is working on CentOS 8, I'm trying to configure MariaDB by making alterations to /etc/my.cnf
but then when I restart DB by doing sudo systemctl restart mariadb
, the server does restart but no configuration changes get applied.
mysql > SHOW VARIABLES;
It outputs the same values. I tried to comment out the including directive #!includedir /etc/my.cnf.d
and to add settings to [mysqld]
and [mariadb]
sections.
mysql --verbose --help
says:
Default options are read from the following files in the given order: /etc/my.cnf ~/.my.cnf.
The following groups are read: mysql client client-server client-mariadb
Check whether mysql uses the config file debugging it with strace
:
sudo strace mysql
In the strace output, look for lines like:
openat(AT_FDCWD, "/etc/my.cnf", O_RDONLY|O_CLOEXEC) = ...
Make sure openat doesn't return -1. In that case check whether the file exists or mysql has enough permissions to read the file.