Overview
max_allowed_packet specifies the maximum size of a network packet.
Privilege requirements
Query variables
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement and theinformation_schema.GLOBAL_VARIABLESview to view the values of global system variables.Modify variables
The
systenant can directly modify the values of global system variables.The user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Int |
| Default Value | 16,777,216 bytes. |
| Value range | [1024,1073741824] |
| Effective Scope | Global |
| Modifiable | Yes, only supports throughSET GLOBALStatement modification. |
Usage instructions
You can modify the value of this variable by using the
SET GLOBALstatement in global scope, but you cannot use theSET SESSIONstatement to modify it in session scope.When using this feature, both the client and server sides generally need to be adjusted. If the values on the two sides do not match, an error
ERROR 1153 (08S01) : Got a packet bigger than \'max_allowed_packet\' bytesis returned.
Configuration example
Set the maximum packet size to 16,777,216 bytes.
obclient> SET GLOBAL max_allowed_packet=16777216;