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

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


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


int<3>payload_lengthLength of the payload. The number of bytes in the packet beyond the initial 4 bytes that make up the packet header.
int<1>sequence_idSequence ID
string<var>payload[len=payload_length] payload of the packet


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.