> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/clientserver-protocol.md).

# Client/Server Protocol

## Client/Server Protocol Overview

{% columns %}
{% column %}
{% content-ref url="/pages/8iIPLcNxH6pTf7vsEFsU" %}
[Protocol Data Types](/docs/server/reference/clientserver-protocol/protocol-data-types.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
This page defines the fundamental data types used in the MariaDB client/server protocol, including integers, strings, and binary representations.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/9psg3Ne14HhqffPITVDf" %}
[MariaDB Protocol Differences with MySQL](/docs/server/reference/clientserver-protocol/mariadb-protocol-differences-with-mysql.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Learn about the specific extensions and differences in the MariaDB protocol compared to MySQL, such as extended capability flags and metadata.
{% endcolumn %}
{% endcolumns %}

## Client/Server Protocol Documentation

{% columns %}
{% column %}
{% content-ref url="/pages/oYSzctw0mtbdRD35Ouz7" %}
[0 - Packet](/docs/server/reference/clientserver-protocol/0-packet.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Understand the standard packet structure in the MariaDB protocol, including the packet header, length, sequence number, and payload handling.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/r5uuOw4a8Vb901a6Le0F" %}
[1 - Connecting](/docs/server/reference/clientserver-protocol/1-connecting.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Learn about the connection phase in the client/server protocol. This section details how clients establish initial communication with the server, including handshaking and authentication processes.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/UWoq1LJon4E7ubWvJwbq" %}
[2 - Text Protocol](/docs/server/reference/clientserver-protocol/2-text-protocol.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Understand the text protocol in the Server's client/server communication. This section details how SQL commands and results are exchanged as plain text, including command types and packet structures.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/XjZIZQOadLs3wS1XFk9u" %}
[3 - Binary Protocol (Prepared Statements)](/docs/server/reference/clientserver-protocol/3-binary-protocol-prepared-statements.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Understand the binary protocol for prepared statements. This section details how prepared statements are exchanged efficiently between client and server, optimizing performance and security.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/IH3kSfCuR3D8LyGV2k7B" %}
[4 - Server Response Packets](/docs/server/reference/clientserver-protocol/4-server-response-packets.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Understand server response packets in MariaDB's client/server protocol. This section details the various types of packets sent by the server, including OK, Error, and Result Set packets.
{% endcolumn %}
{% endcolumns %}

## Replication Protocol Documentation

{% columns %}
{% column %}
{% content-ref url="/pages/qbQmXYDJBkftXewYTZvf" %}
[Replication Protocol](/docs/server/reference/clientserver-protocol/replication-protocol.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Understand the replication protocol. This section details how primary and replica servers communicate, exchanging binary log events to ensure data consistency and enable high availability.
{% endcolumn %}
{% endcolumns %}
