Documentation Home
MySQL Internals Manual


MySQL Internals Manual  /  MySQL Client/Server Protocol

Chapter 14 MySQL Client/Server Protocol

Table of Contents

14.1 Overview
14.1.1 Basic Data Types
14.1.2 MySQL Packets
14.1.3 Generic Response Packets
14.1.4 Character Set
14.1.5 Connection Lifecycle
14.1.6 Command Phase
14.2 Connection Phase
14.2.1 Initial Handshake
14.2.2 Auth Phase Fast Path
14.2.3 Authentication Method Mismatch
14.2.4 Authentication After COM_CHANGE_USER Command
14.2.5 Connection Phase Packets
14.2.6 Capability Flags
14.3 Authentication Method
14.3.1 Limitations
14.3.2 Old Password Authentication
14.3.3 Secure Password Authentication
14.3.4 Clear Text Authentication
14.3.5 Windows Native Authentication
14.3.6 SHA256
14.4 Compression
14.4.1 Compressed Packet
14.4.2 Compressed Packet Header
14.4.3 Compressed Payload
14.4.4 Uncompressed Payload
14.5 SSL
14.6 Text Protocol
14.6.1 COM_SLEEP
14.6.2 COM_QUIT
14.6.3 COM_INIT_DB
14.6.4 COM_QUERY
14.6.5 COM_FIELD_LIST
14.6.6 COM_CREATE_DB
14.6.7 COM_DROP_DB
14.6.8 COM_REFRESH
14.6.9 COM_SHUTDOWN
14.6.10 COM_STATISTICS
14.6.11 COM_PROCESS_INFO
14.6.12 COM_CONNECT
14.6.13 COM_PROCESS_KILL
14.6.14 COM_DEBUG
14.6.15 COM_PING
14.6.16 COM_TIME
14.6.17 COM_DELAYED_INSERT
14.6.18 COM_CHANGE_USER
14.6.19 COM_RESET_CONNECTION
14.6.20 COM_DAEMON
14.7 Prepared Statements
14.7.1 Binary Protocol Resultset
14.7.2 Binary Protocol Resultset Row
14.7.3 Binary Protocol Value
14.7.4 COM_STMT_PREPARE
14.7.5 COM_STMT_SEND_LONG_DATA
14.7.6 COM_STMT_EXECUTE
14.7.7 COM_STMT_CLOSE
14.7.8 COM_STMT_RESET
14.8 Stored Procedures
14.8.1 Multi-Resultset
14.8.2 Multi-Statement
14.8.3 COM_SET_OPTION
14.8.4 COM_STMT_FETCH
14.9 Replication Protocol
14.9.1 Binlog File
14.9.2 Binlog Network Stream
14.9.3 Binlog Version
14.9.4 Binlog Event
14.9.5 COM_BINLOG_DUMP
14.9.6 COM_BINLOG_DUMP_GTID
14.9.7 COM_TABLE_DUMP
14.9.8 COM_CONNECT_OUT
14.9.9 COM_REGISTER_SLAVE
14.10 Row-Based Replication
14.10.1 TABLE_MAP_EVENT
14.10.2 ROWS_EVENT
14.10.3 ROWS_QUERY_EVENT
14.11 Semi-Synchronous Replication
14.11.1 Semi-Synchronous Binlog Event
14.11.2 Semi-Synchronous ACK Packet
14.12 Protocol Examples
14.12.1 A mysql Client Logs In
14.12.2 ProtocolText::Resultset
14.12.3 Auth Method Switch
14.12.4 SHA256 Example
14.13 Source Code Locations
14.13.1 MySQL Server
14.13.2 Binary Protocol Type Implementation
Important

The content in this chapter is outdated. For current information, please refer to the Client/Server Protocol section of the MySQL Server Doxygen documentation, available at https://dev.mysql.com/doc/index-other.html.