devnotes.

What is MySQL? Features & Architecture

MySQL is a free, open-source relational database management system, originally released in 1995 and now owned by Oracle. It powers a huge portion of the web — WordPress, Facebook's early stack, Shopify, and countless internal business systems.

Why MySQL is popular

  • Free and open source (GPL), with a paid enterprise edition.
  • Fast for read-heavy workloads and well understood by almost every developer.
  • Runs on Linux, Windows, macOS, Docker and every major cloud.
  • Mature ecosystem: Workbench, phpMyAdmin, connectors for PHP, Node.js, Python, Java, Go.

Client–server architecture

MySQL follows a client-server model in three layers:

  1. Connection layer — accepts connections, authenticates users, manages threads and connection pooling.
  2. Server layer — parser, optimizer, query cache (removed in 8.0), and all built-in SQL functionality. This is where your query is parsed into a tree and an execution plan is chosen.
  3. Storage engine layer — pluggable engines that actually read and write data on disk.
Client (app / mysql CLI)
        │
   Connection layer  ──► authentication, threads
        │
   Server layer      ──► parser → optimizer → executor
        │
   Storage engine    ──► InnoDB / MyISAM / MEMORY
        │
     Disk / files

Storage engines

EngineTransactionsLockingBest for
InnoDB (default)Yes (ACID)Row-levelAlmost everything
MyISAMNoTable-levelLegacy read-only data
MEMORYNoTable-levelFast temporary lookup tables
ARCHIVENoRow-levelCompressed cold storage
CSVNoTable-levelData exchange as plain CSV

Use InnoDB unless you have a specific, well-understood reason not to. It supports foreign keys, crash recovery, and MVCC.

MySQL vs MariaDB vs PostgreSQL

  • MariaDB is a community fork of MySQL, mostly drop-in compatible, with extra engines.
  • PostgreSQL is stricter about standards and stronger for complex queries, custom types and GIS.
  • MySQL 8.x closed much of the gap with window functions, CTEs, JSON and better optimizer behaviour.
What is MySQL — Features, Storage Engines & Architecture | DevNotes