Interactive course · 22 lessons · ~7 hours

MySQL, from the query down to the disk.

The SQL course teaches the language. This one teaches the machine: what the MySQL server does with your query, how InnoDB stores a row, why the primary key choice decides your performance, how readers avoid blocking writers — and how to run it without losing data.

0 of 22 lessons complete0%

The one picture this course is built on

Every MySQL query crosses two very different layers. Knowing which layer a problem lives in is most of the skill of running MySQL.

Clients your app via a connector · the mysql CLI · Workbench · a BI tool — all speak the MySQL protocol on port 3306 SERVER LAYER — engine-independent (lessons 01, 10–16) Connection handling one thread per connection authentication (user@host) privilege checks Parser SQL text → parse tree resolve tables/columns syntax errors raised here Optimizer ⭐ chooses indexes, join order, access method — by estimated cost what EXPLAIN shows you (13) Executor runs the plan by calling the storage engine's handler API row by row handler API: "give me the next row from this index" STORAGE ENGINE — InnoDB (lessons 05–09) Buffer pool (RAM) cached 16 KB pages of data + index reads served from memory when hot dirty pages flushed in the background The #1 tuning knob (lesson 17) Logs redo log — makes COMMIT durable undo log — old row versions for MVCC binlog (server layer) — replication Crash safety + replication (07, 19) Tablespaces on disk one .ibd file per table the table IS a B+tree ordered by the primary key The clustered index (lesson 06)
Two layers, two kinds of problem. "The optimizer picked the wrong index" is a server-layer problem; "the query waits on a lock" or "commits are slow" is an InnoDB problem. Diagnosing which one you have is the first move every time.
Take the SQL course first?

You should be comfortable with SELECT, joins and GROUP BY before starting. If you are not, do SQL lessons 01–09 first. The two courses share the same retail database so you can move between them freely.

Pick a path

~2 hours

My queries are slow

Lessons 06, 10, 11, 12, 13, 14. Clustered index, index design and EXPLAIN — most real wins live here.

~2 hours

I get deadlocks and lock waits

Lessons 07, 08, 09. MVCC and InnoDB's locking model, then how to read a deadlock report.

~2 hours

I have to run it in production

Lessons 03, 17, 18, 19, 20, 21. Configuration, backups you have tested, replication, monitoring, security.

~7 hours

I want to really know MySQL

Start at lesson 01 and go in order, then do the project.

Ships with a hands-on project

🛠 Make a slow database fast — then break it and recover it

Load the retail schema scaled to ~200k rows into MySQL 8 in Docker. Measure a set of slow queries with EXPLAIN ANALYZE, design indexes and prove the speedup, reproduce a deadlock with two sessions, then take a backup, "lose" data, and do a point-in-time restore from the binary log.

Open the project →

The curriculum

Version

Everything targets MySQL 8.0 / 8.4 LTS with InnoDB. Where MariaDB or MySQL 5.7 behave differently in ways that matter, the lesson says so.