您可以通过运行找到所需的信息
mysql --help
要么
mysqld --help --verbose
我在机器上尝试了以下命令:
mysql --help | grep "Default options" -A 1
它打印出来:
Default options are read from the following files in the given order:/etc/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
看看是否适合您。

您可以通过运行找到所需的信息
mysql --help
要么
mysqld --help --verbose
我在机器上尝试了以下命令:
mysql --help | grep "Default options" -A 1
它打印出来:
Default options are read from the following files in the given order:/etc/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
看看是否适合您。