NOTE
1.14 MySQL Architecture
The path from a client connection through parsing, optimization, execution, and the storage-engine interface.
This is a historical learning note and may contain outdated or incomplete understanding.
1. Logical Architecture

A simplified query path is:
- a client establishes a connection and sends SQL;
- the server parses and validates the statement;
- the optimizer explores candidate access paths and join orders and chooses an execution plan;
- the executor runs that plan through storage-engine APIs;
- rows are returned to the client.
2. Server Layer
The MySQL server layer owns concerns shared across storage engines, including connection/session handling, SQL parsing, optimization, execution orchestration, privilege checks, and the binary log.
2.1 Parser
Builds and validates the SQL representation used by later stages.
2.2 Query Optimizer
Chooses access methods, indexes, join order, and physical operators using rules, statistics, and cost estimates.
2.3 Executor
Drives the chosen plan and asks the storage engine to read or modify rows.
3. Storage-Engine Layer
Storage engines implement physical data/index storage, locking and transaction behavior specific to the engine. InnoDB is the default general-purpose transactional engine in modern MySQL.
The server/storage-engine boundary is why MySQL has both server-level facilities such as binlog and InnoDB-specific facilities such as redo log, undo log, MVCC, and the buffer pool.