mysqld --verbose --help | grep -A 1 "Default options"
我这里输出如下:
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
参考:
MySQL config file location - redhat linux server [closed]