sajad torkamani

Run mysql --help and you should see a bit of text that reads something like:

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /opt/homebrew/etc/my.cnf ~/.my.cnf 

You can also grep for that relevant text with:

mysql --help | grep -i "Default options are read" -A 4
Tagged: MySQL