# 查看MySQL服务程序安装位置 $ which mysqld /usr/sbin/mysqld # 查看MySQL服务程序默认使用的配置文件 $ sudo /usr/sbin/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 ~/.my.cnf