- 参考MYSQL官网
查看变量
mysql> show variables like 'max%' ;
设置变量
mysql> set max_allowed_packet = 1500000;
mysql> SET GLOBAL max_allowed_packet=16*1024*1024;
shell> mysql --max_allowed_packet=16*1024*1024
查看变量
mysql> show variables like 'max%' ;
设置变量
mysql> set max_allowed_packet = 1500000;
mysql> SET GLOBAL max_allowed_packet=16*1024*1024;
shell> mysql --max_allowed_packet=16*1024*1024