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
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:
05
System Requirements
Before downloading, make sure your system meets these basics:
| Component | Minimum Requirement |
|---|---|
| OS | Windows 10/11, macOS 12+, or Linux (64-bit) |
| RAM | 2GB minimum (4GB+ recommended) |
| Disk Space | ~500MB for a basic installation |
| Architecture | 64-bit x86 or ARM64 (Apple Silicon) |
06
How to Download MySQL
- Go to the official download page. Visit
dev.mysql.com/downloads/installer/. - Select your operating system — for example, Windows.
- Choose the MySQL Installer Community package.
- 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
- Run the installer. Double-click the downloaded file to launch the setup wizard.
- Choose setup type. Select Developer Default (includes Server, Workbench, Shell, and Connectors), then click Next.
- Check requirements. If prerequisites are missing (like Visual C++ Redistributable), click Execute to install them automatically, then click Next.
- 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.
- 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.
Search for "Services" in the Start Menu, find MySQL80 (or similar), and confirm its status is Running.
Open your terminal and check the status:
09
How to Check if the Installation Is Complete
- Open a terminal. Command Prompt on Windows, or Terminal on Mac/Linux.
- Run this command:
mysql --version
- 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
Open MySQL Command Line Client from your applications, then enter the root password you created during setup.
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:
12
MySQL vs. phpMyAdmin
It's easy to mix these two up when you're starting out:
The actual database engine that stores and manages your data.
A web-based management tool (written in PHP) used to control MySQL databases through a browser — popular in hosting environments like cPanel.
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
| Issue | Cause | Solution |
|---|---|---|
| "Access Denied for user 'root'@'localhost'" | Incorrect password entered | Re-enter the password carefully, or reset the root password |
| "Command not found: mysql" | Path environment variable missing | Add the MySQL bin directory to your system's Environment Variables |
| Port 3306 in use | Another database or service is using the port | Change 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 DATABASEin 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.