max_allowed_packet specifies the maximum size in bytes of a network packet.
| Attribute | Description |
|---|---|
| Type | Integer |
| Default value | 16777216
NoteThe default value has been changed from |
| Value range | [1024, 1073741824] |
| Effective scope | |
| Involved in serialization | Yes |
| Modifiable | You can use the SET GLOBAL statement to modify the global value of the variable. However, you cannot use the SET SESSION statement to modify a session value of the variable. You can only view the session value. The session value must be the same as the global value. Generally, this variable must be modified on both the client and the server. |