Check which MySQL configuration file is being used

Once we install the MySQL in Linux operating system and we will get confused with which MySQL config file we have changed or configured during the MySQL setup

To get the exact config file that was used by MySQL, use the below information

mysqld --verbose --help | less

Or you can use the below method also, both are similar

$ which mysqld
/usr/sbin/mysqld

$ /usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"
Default options are read from the following files in the given order:
/etc/mysql/my.cnf ~/.my.cnf /usr/etc/my.cnf
0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like