Documentation Home
MySQL Internals Manual

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.


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


A COM_QUIT looks like this:

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

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.