Documentation Home
MySQL Internals Manual
Download this Manual
EPUB - 1.2Mb


MySQL Internals Manual  /  ...  /  MySQL Packets

14.1.2 MySQL Packets

If a MySQL client or server wants to send data, it:

  • Splits the data into packets of size (224−1) bytes

  • Prepends to each chunk a packet header

Protocol::Packet

Data between client and server is exchanged in packets of max 16MByte size.

Payload

Type Name Description
int<3> payload_length Length of the payload. The number of bytes in the packet beyond the initial 4 bytes that make up the packet header.
int<1> sequence_id Sequence ID
string<var> payload [len=payload_length] payload of the packet

Example

A COM_QUIT looks like this:

01 00 00 00 01
* length: 1
* sequence_id: x00
* payload: 0x01

User Comments
Sign Up Login You must be logged in to post a comment.