You will see several MySQL version numbers online. Here is what they mean, and which one to use.
The release series
| Series | What it is |
|---|---|
| MySQL 5.7 | Very old. Reached end of life in 2023. Many old tutorials still use it. |
| MySQL 8.0 | Introduced window functions, CTEs, roles, CHECK constraints and much more. Oracle moved it to Lifetime Sustaining Support in April 2026, which means it no longer gets regular fixes and features. |
| MySQL 8.4 LTS | A Long-Term Support release. Stable, with a long support period. A good default for production. |
| MySQL 9.x | A newer series. Oracle’s April 2026 notice recommends upgrading from 8.0 to 8.4 LTS or 9.7 LTS. |
LTS means “long-term support”: a version meant to stay stable for years, with fixes but without surprise changes. Check mysql.com for the current support dates before you plan a deployment.
What this course targets
Everything in this course works on MySQL 8.4 LTS. The examples were run on real MySQL 8.4 servers, and the important ones were also run on 9.7 and 8.0 to check for differences. Where a command behaves differently between versions, the lesson says so.
A big change you should know
mysql_native_password login method is off by default, and the default method is caching_sha2_password. Most modern tools handle that. Very old clients and some older PHP or driver versions may not. The Users and Roles lessons explain it.Which version should you install?
- Learning on your own computer: the newest 8.4 (or the current LTS) is best, so you match what servers run today.
- A hosting company’s MySQL: use whatever they give you, and check the version first.
- A new production server: an LTS release.
How to check your version
SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 8.4.11 |
+-----------+
1 row in set
(The number on your machine will be different. A server that prints something like 10.11.6-MariaDB is MariaDB.)
MariaDB is not MySQL
MariaDB began as a copy of MySQL and has since gone its own way. Many everyday statements work on both, but modern features can differ. For example, MySQL 8’s CHECK constraints, window functions and JSON column type exist in MariaDB in a different form, and the system tables and some function names differ. If you use XAMPP or a cheap hosting plan, check VERSION() and the @@version_comment before you copy examples that depend on newer MySQL behaviour.
A habit worth building
Always write which version an example was tested on, in your notes and in team documentation. “It works on MySQL 8.4” is useful. “It works” is not.
When a tutorial looks wrong
GROUP BY without strictness) or may miss features that now exist (CTEs, window functions).