1:查看配置文件位置,越靠前,越优先

mysql --help| grep 'my.cnf'

2:更改my.cnf文件

MySQL8内存消耗 mysql8吃内存_mysql


3:my.cnf默认文件

#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

4: 更改后的文件
暂定