🐬

MySQL

The popular relational database

The world's most popular open-source relational database. Learn schema design, SQL, and how to run MySQL in real applications.

πŸ“˜ 9 lessonsπŸš€ 2 projectsπŸ—ΊοΈ 1 roadmaps🐞 4 error fixes

MySQL Setup

Install MySQL (or use a hosted one) and run your first queries.

1

Install MySQL

terminal
# Download MySQL Community Server from https://dev.mysql.com/downloads

What it does

Installs the MySQL server plus client tools. On a hosted option (PlanetScale, Railway) you skip this.

Why you need it

You need a running MySQL server to create databases and run queries.

Alternatives: Docker (`mysql` image), PlanetScale, Railway, AWS RDS.

2

Connect and create a database

terminal
mysql -u root -p
CREATE DATABASE myapp;

What it does

Log into the MySQL shell and create your first database.

Why you need it

A database is the container all your tables live in.

3

Create a table

terminal
CREATE TABLE users (
  id INT AUTO_INCREMENT PRIMARY KEY,
  email VARCHAR(255) UNIQUE
);

What it does

Define the columns and types for your data.

Why you need it

Tables give your data a consistent shape MySQL can enforce.