Which my.cnf is mysql using?

mysql searches for your local my.cnf in a number of default places, so finding which is actually in use can be an issue.

To find which search paths are currently being used by your current mysql install (from here), use:

mysql --help | grep my.cnf

And it will show a list of paths like this:

> mysql --help | grep my.cnf
order of preference, my.cnf, $MYSQL_TCP_PORT,
/etc/my.cnf /etc/mysql/my.cnf /opt/homebrew/etc/my.cnf ~/.my.cnf

Note that if you installed mysql via homebrew (on MacOS), this will also show the homebrew path where my.cnf is located.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.