我遇到了一些麻烦设置MySql(运行在CentOS7上的mariadb)当我发布时
show global variables where variable_name = 'max_allowed_packet';
回应是
+--------------------+---------+
| Variable_name | Value |
+--------------------+---------+
| max_allowed_packet | 1048576 |
+--------------------+---------+
1 row in set (0.00 sec)
女巫意味着它是1M . 我需要永久保留这个5M或更大的值我尝试通过添加来编辑文件/etc/my.cnf
[mysqldump]
max_allowed_packet=16M
所以它仍然是这样的 .
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqldump]
max_allowed_packet=16M
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
但重新启动服务器后,它看起来像max_allowed_packet = 1048576请问有什么建议吗?提前致谢 .