I'm using stand-alone database on Debian, and I'm new to MariaDB.
In MySQL, I used to deal with only one my.cnf
which contained all relevant parameters that I needed.
Here, in MariaDB 10, there are dozens of them:
/etc/mysql# tree
.
├── conf.d
│ ├── mysql.cnf
│ └── mysqldump.cnf
├── debian.cnf
├── debian-start
├── mariadb.cnf
├── mariadb.conf.d
│ ├── 50-client.cnf
│ ├── 50-mysql-clients.cnf
│ ├── 50-mysqld_safe.cnf
│ └── 50-server.cnf
├── my.cnf -> /etc/alternatives/my.cnf
└── my.cnf.fallback
I need to modify parameters like max_connections
, innodb_buffer_pool_size
and long_query_time
to register slow queries. I added them to my.cnf
but then the server refused to restart.
So I'm wondering what file should I modify?
To check which configuration files are processed by the server, just execute
$ /path_to_mysqld/mysqld --help --verbose
At the beginning of output you will find information about configuration files, e.g.
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
Please note, that a setting might be overwritten, e.g. if /etc/my.cnf contains the value val=1, but ~/my.cnf contains val=3.
Since you mentioned that the server refused to start, you likely added your changes to the right file, but the settings are incorrect. In this case you should check the error log in your data directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With