centos7下查看mysql配置文件适用顺序

mysql --help|grep 'my.cnf'

[root@izm5e2q95pbpe1hh0kkwoiz ~]# mysql --help|grep 'my.cnf'
                      order of preference, my.cnf, $MYSQL_TCP_PORT,
/etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf 

mysql默认会搜寻my.cnf的目录,顺序排前的优先。

阿里云服务器mysql配置文件生效位置

/etc/my.cnf

参考

https://blog.csdn.net/qq_22227087/article/details/80946894

原文地址:https://www.cnblogs.com/eternityz/p/12243344.html