Notifications
Clear all

How to find which MariaDB configuration file is being used Ubuntu

2 Posts
1 Users
0 Reactions
28 Views
Tharindu
(@tharindu)
Reputable Member Admin
Joined: 10 years ago
Posts: 309
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)
Reputable Member Admin
Joined: 10 years ago
Posts: 309
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

   
ReplyQuote
Share:
Back to top button