Albin Joseph Albin Joseph - 1 year ago 40
SQL Question

How to find out the location of currently used MySQL configuration file in linux

How do I know which configuration file is used by MySQL currently? Is there any command or something to find it out?

Answer Source

The information you want can be found by running

mysql --help


mysqld --help --verbose

I tried this command on my machine:

mysql --help | grep Default -A 1

And it printed out:

Default options are read from the following files in the given order:
/etc/my.cnf /usr/local/etc/my.cnf ~/.my.cnf

See if that works for you.