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配置文件生效位置

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
/etc/my.cnf

参考

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

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄