查看my.cnf配置文件顺序

# which mysqld
/usr/local/mysql/bin/mysqld

# /usr/local/mysql/bin/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/mysql/etc/my.cnf ~/.my.cnf 
原文地址:https://www.cnblogs.com/l10n/p/14043528.html