MySQL Tutorial (official manual)
The tutorial chapter of the official MySQL Reference Manual, for the current 9.7 LTS release. It shows how to connect with the mysql client, enter queries, create a database and tables, load data and query it, with short worked examples throughout.
Guide
Web Development
Oracle
Beginner
Free
What it is
The MySQL Reference Manual includes a tutorial chapter aimed at people who are new to MySQL. It walks through connecting to and disconnecting from the server with the mysql command-line client, entering queries, creating and using a database, creating tables, loading data, retrieving information with SELECT (selecting rows and columns, sorting, date calculations, NULL values, pattern matching, counting rows and using more than one table), getting information about databases and tables, running the client in batch mode, and examples of common queries.
The link points at the manual for MySQL 9.7, the Long-Term Support release that came out in April 2026. As of 2026-09, Oracle ships LTS releases alongside quarterly Innovation releases, and newer releases use calendar version numbers such as 26.7 (source: MySQL Reference Manual, MySQL Releases: Innovation and LTS). The tutorial content changes little between versions.
Is it worth your time?
Yes, as your first hour with MySQL. It is short and practical, and it teaches the mysql client, which you need on any server without a GUI. It is not a full SQL course: joins, grouping and subqueries are only touched on, so pair it with an interactive course and a practice site.
Prerequisites
A MySQL server you can connect to, installed locally or in Docker, and a user account. No prior SQL is needed.
Free vs paid
Free. MySQL Community Server is free and open source under the GPL; Oracle also sells commercial editions, which you do not need to learn.
How to use it well
- Type every example yourself in the mysql client rather than copying it.
- Keep the statements you write in a .sql file and rerun it with SOURCE, as the batch mode section shows.
- When an example uses a function you do not know, look it up in the function reference of the same manual.
Common questions
LTS or Innovation release? For learning and for anything you deploy, the LTS release is the safer choice because it changes less; Innovation releases add features each quarter and are supported only until the next one.
Does it cover MySQL Workbench? No, the tutorial uses the command-line client. Workbench has its own manual.
Old tutorials say MySQL 5.7 or 8.0. Does that matter? Yes: defaults such as the character set and the authentication plugin have changed, so prefer material written for 8.4 or later.
Ready to start?
Opens on Oracle in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.