MySQL Client / Server protocol is used in many areas. For example:
- MySQL Connectors like ConnectorC, ConnectorJ and etc.
- MySQL proxy
- Between master and slave
What is MySQL Client / Server protocol?
MySQL Client / Server protocol is accepted conventions (rules). Through these rules client and server “talks” and understand each other. Client connects to server through TCP connection with special socket, sends to server special packets and accepts them from server. There are two phases of this connection:
- Connection phase
- Command phase
Next illustration describes phases:
STRUCTURE OF PACKETS
Each packet consists of valuable data types. Maximum length of each packet can be 16MB. If the length of packet is more than 16MB, then it is separated into several chunks (16MB). First of all let’s see the protocol data types. …
[Read more]