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
2
Answers
Check whether mysql uses the config file debugging it with
strace
:In the strace output, look for lines like:
Make sure openat doesn't return -1. In that case check whether the file exists or mysql has enough permissions to read the file.
When adding additional configuration files, make sure that they are not writable by ‘other’. Otherwise you’ll have a message on mysql startup like:
and the configuration does not get applied.