关于这个参数可以查看mysql的官方文档: https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_allowed_packet Property Value Command-Line Format --max-allowed-packet=# System Variable max_allowed_packet Scope Global, Session Dynamic Yes Type integer Default Value 4194304 Minimum Value 1024 Maximum Value 1073741824该参数可以在session进行修改,最小1k,最大1GB,默认4M
【四】解决方法 点击(此处)折叠或打开
参数查看的方法 mysql> show VARIABLES like '%max_allowed_packet%'; +--------------------------+------------+ | Variable_name | Value | +--------------------------+------------+ | max_allowed_packet | 1073741824 | | slave_max_allowed_packet | 1073741824 | +--------------------------+------------+ 2 rows in set (0.00 sec)
不重启数据库的修改方法,但是修改之后要重新登陆mysql set global max_allowed_packet =512*1024*1024