#查看mysql命令的路径
root@msc3:~# which mysqld
/usr/sbin/mysqld
#执行下边命令找到my.cnf
root@msc3:~# /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