$ 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
You can also do mysql –print-defaults to show you how the configuration values it will use. This can also be useful in identifying just which config file it is loading.
See also: http://www.dbasquare.com/2012/04/01/how-to-find-mysql-configuration-file/