Start using MySQL

What MySQL is

Understand the client-server database model and where MySQL sits between your application and its data files.

MySQL is a relational database management system. Relational means the data lives in tables: rows of records, columns with fixed names and types, and relationships between tables expressed through shared values. You work with all of it through one language, SQL.

The part that shapes everything else in this course is the client-server model. A server process owns the data and accepts connections from command-line clients, graphical tools, and applications. Your application does not edit database files directly. It authenticates, sends SQL over a connection, and receives rows or an error from the server.

That indirection is the point. Because every read and write flows through the server, the server can enforce rules that no single application could guarantee on its own: many clients writing at once without corrupting each other, accounts that can read but not delete, and transactions that either fully happen or fully do not. When we create users and grants later in the course, we are configuring exactly this layer.

A typical exchange looks like this. The client sends:

SELECT title FROM notes WHERE id = 1;

The server checks the account’s permissions, finds the row, and answers:

+---------------+
| title         |
+---------------+
| Plan the week |
+---------------+
1 row in set (0.00 sec)

Every tool you will meet — the mysql client, a Node.js driver, a backup program — is just another client having this same conversation.

MySQL earned its place by running an enormous share of the web. WordPress sits on it, and most hosting platforms offer it as a managed service, so the skills here transfer directly to real projects. PostgreSQL is the other major open-source relational database; the SQL fundamentals overlap heavily, so nothing you learn here is wasted if you switch.

This course uses MySQL 8.4 LTS, the long-term support release. The basic SQL also works on newer releases, but installation, upgrades, and defaults can differ between release lines, so the lessons pin one version to keep every command reproducible.

Lesson completed

Take this course offline

Get every free book, course edition, and software download.

Get the download library →