How to Install MySQL Step by Step for Beginners

Complete Guide 2026 — from download to your first database
$ mysql --version mysql Ver 8.x.x for Win64 on x86_64

Setting up a database for the first time can feel intimidating — technical jargon, terminal windows, and configuration screens everywhere. If you've ever followed an outdated tutorial and hit a confusing error halfway through, you're not alone.

The good news: installing MySQL doesn't have to be complicated. This guide walks through the whole process step by step — from downloading the installer to running your very first database command — so you can be up and running smoothly today.

01

What is MySQL?

MySQL is an open-source Relational Database Management System (RDBMS). In plain terms, it's software that stores, organizes, and manages your data efficiently. It uses SQL (Structured Query Language) — the standard language for asking questions of and updating relational databases.

02

History of MySQL

1995Created by Swedish company MySQL AB, founded by David Axmark, Allan Larsson, and Michael "Monty" Widenius.
2008Acquired by Sun Microsystems.
2010Sun Microsystems — and MySQL with it — was acquired by Oracle Corporation, which still maintains and develops it today.

Despite changing hands over the decades, MySQL remains one of the most widely adopted open-source database engines in the world.

03

Why Use MySQL?

MySQL powers millions of websites and applications worldwide. Here's why developers choose it:

  • Open-source & free: the Community Edition costs nothing to use.
  • Proven performance: fast query handling, optimized for read-heavy applications.
  • Scalability: handles everything from a small personal blog to a massive enterprise database.
  • Strong community support: countless guides, forums, and documentation are readily available.

04

Features and Components

When you work with MySQL, you'll encounter two core components:

MySQL ServerThe background database engine that manages data storage, security, and query processing.
MySQL WorkbenchA graphical interface (GUI) that lets you design, manage, and interact with databases visually — no command line required.

05

System Requirements

Before downloading, make sure your system meets these basics:

ComponentMinimum Requirement
OSWindows 10/11, macOS 12+, or Linux (64-bit)
RAM2GB minimum (4GB+ recommended)
Disk Space~500MB for a basic installation
Architecture64-bit x86 or ARM64 (Apple Silicon)

06

How to Download MySQL

  1. Go to the official download page. Visit dev.mysql.com/downloads/installer/.
  2. Select your operating system — for example, Windows.
  3. Choose the MySQL Installer Community package.
  4. Click Download. You can click "No thanks, just start my download" at the bottom to skip creating an Oracle account.

07

Installing MySQL Step by Step

  1. Run the installer. Double-click the downloaded file to launch the setup wizard.
  2. Choose setup type. Select Developer Default (includes Server, Workbench, Shell, and Connectors), then click Next.
  3. Check requirements. If prerequisites are missing (like Visual C++ Redistributable), click Execute to install them automatically, then click Next.
  4. Set your root password. During the Type and Networking / Accounts steps, set a secure root password — keep this safe, you'll need it every time you connect.
  5. Complete configuration. Keep the default Windows Service options checked, click Execute to apply everything, then click Finish.

08

Starting MySQL

On most systems, the MySQL service starts automatically right after installation.

Windows

Search for "Services" in the Start Menu, find MySQL80 (or similar), and confirm its status is Running.

macOS / Linux

Open your terminal and check the status:

sudo systemctl status mysql

09

How to Check if the Installation Is Complete

  1. Open a terminal. Command Prompt on Windows, or Terminal on Mac/Linux.
  2. Run this command:
    mysql --version
  3. Check the output. If it returns a version number, like mysql Ver 8.x.x, your installation is complete and ready to use.

10

Opening MySQL: Two Ways In

Option A — Command Line Client (CLI)

Open MySQL Command Line Client from your applications, then enter the root password you created during setup.

Option B — MySQL Workbench (GUI)

Open MySQL Workbench, click Local Instance MySQL, then enter your root password to enter the visual workspace.

11

Creating and Checking a Database

Once you're connected — via CLI or Workbench — run these basic commands:

-- 1. Create a new database named 'my_first_db' CREATE DATABASE my_first_db; -- 2. View all existing databases to verify creation SHOW DATABASES; -- 3. Select the database to start using it USE my_first_db;

12

MySQL vs. phpMyAdmin

It's easy to mix these two up when you're starting out:

MySQL

The actual database engine that stores and manages your data.

phpMyAdmin

A web-based management tool (written in PHP) used to control MySQL databases through a browser — popular in hosting environments like cPanel.

Summary

MySQL is the engine under the hood; phpMyAdmin is just one of several dashboards you can use to drive it.

13

Common Problems and Solutions

IssueCauseSolution
"Access Denied for user 'root'@'localhost'"Incorrect password enteredRe-enter the password carefully, or reset the root password
"Command not found: mysql"Path environment variable missingAdd the MySQL bin directory to your system's Environment Variables
Port 3306 in useAnother database or service is using the portChange MySQL's port to 3307 during installation, or stop the competing service

14

Tips for Beginners

  • Write commands in uppercase. SQL isn't strictly case-sensitive, but writing keywords like CREATE DATABASE in uppercase makes your code much easier to read.
  • Don't forget the semicolon. Every SQL statement needs a ; at the end to execute.
  • Use Workbench while learning. A visual view of your schema makes it much easier to understand how tables connect.

15

Conclusion

Congratulations — you've installed, configured, and created your very first database in MySQL. These initial steps open the door to building dynamic websites, backend applications, and data analysis projects.

Further reading: the official MySQL documentation and the MySQL Workbench user manual are both excellent next stops.

16

Frequently Asked Questions

Is MySQL completely free to use?

Yes. The MySQL Community Server edition is 100% free and open-source under the GNU General Public License.

Can I run MySQL on a Mac with Apple Silicon (M1/M2/M3/M4)?

Yes. MySQL provides native ARM64 installers built specifically for Apple Silicon Macs.

What should I do if I forget my MySQL root password?

You'll need to start the MySQL server in skip-grant-tables mode from the command line, then reset the administrative password from there.

Post a Comment

Previous Post Next Post