Notifications
Clear all

How to find which MariaDB configuration file is being used Ubuntu


Tharindu
(@tharindu)
Admin
Joined: 8 years ago
Posts: 289
Topic starter  

When you replace MySQL with MariaDB or install MariaDB on a fresh Ubuntu server, it's important to find the correct config file to make your changes. Because if you edit the wrong file, your changes will not take effect. A user reported similar situation few months ago where Virtualmin loading incorrect mariadb config file and the changes they make had no effect at all. 

I pointed them to right direction. But still location of the loaded MariaDB can change from server to server as there are few locations that MariaDB look for the configuration. Best way to find it is to ask,

which mysqld

This returned following output,

/usr/sbin/mysqld

Now modify and execute following command based on the output you got.

/usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"

MariaDB will tell you what location it look for config file and in what order.


Quote
Topic Tags
Tharindu
(@tharindu)
Admin
Joined: 8 years ago
Posts: 289
Topic starter  

On an Ubuntu 20.04 server with Virtualmin, I found that the MySQL 8 configuration file is located at /etc/mysql/mysql.conf.d/ directory.

You can open it with nano text editor with following command,

nano /etc/mysql/mysql.conf.d/mysqld.cnf
This post was modified 4 weeks ago 2 times by Tharindu

ReplyQuote
Share:
Back to top button

We use cookies to give you the best online experience. By agreeing you accept the use of cookies in accordance with our cookie policy.