Installing & Verifying MySQL
This article is for absolute beginners who have never installed database software.
By the end of this article, you will be able to say confidently:
- MySQL is installed
- MySQL Server is running
- You can connect successfully
No assumptions. No skipped steps.
What Exactly Are We Installing?
We are installing MySQL, which consists of two main parts:
- MySQL Server
Runs in the background and stores data. - MySQL Client Tools
Used to connect to the server (Workbench or Command Line).
If the server is missing or not running, MySQL will not work.
1: Go to the Official Download Page
Open this link in your browser:
https://dev.mysql.com/downloads/
This is the only correct source.
Do not download MySQL from random websites.
2: What to Click (Very Important)
On the download page, you will see many products.
If You Are on Windows
Click MySQL Installer for Windows
Ignore everything else.
If You Are on macOS
Click MySQL Community Server
Then download the DMG Archive.
Do not download:
- MySQL Shell
- MySQL Router
- Connector files
Those are not for beginners.
Installing MySQL on Windows (Step by Step)
Step 1: Run the Installer
Double-click the downloaded MySQL Installer file.
Step 2: Choose Setup Type
Select Full.
This installs:
- MySQL Server
- MySQL Workbench
- MySQL Command Line Tools
Do not customize anything.
Step 3: Configuration Settings
Keep all defaults:
- Port: 3306
- Authentication: Strong password
- Run MySQL as a Windows Service: Yes
Step 4: Set Root Password
Set a password for the root user.
Write this password down.
You will need it every time you connect.
Step 5: Finish Installation
Click Finish and close the installer.
At this point, MySQL Server should be running automatically.
Installing MySQL on macOS (Step by Step)
Step 1: Open the DMG File
Double-click the downloaded DMG file.
Step 2: Follow the Installer
Click Continue and accept defaults.
Step 3: Set Root Password
During installation, you will be asked to set a root password.
Save this password carefully.
Step 4: Complete Installation
Finish the setup wizard.
MySQL Server is now installed on your system.
3: Start MySQL Server (Do Not Skip)
On Windows
- MySQL Server starts automatically
- You do not need to open anything manually
On macOS
- Open System Settings
- Click MySQL
- Click Start MySQL Server
If the server is not running, MySQL will not work.
4: Install MySQL Workbench (If Not Installed)
Windows
Workbench is installed automatically with Full Setup.
macOS
Download MySQL Workbench separately from the same website and install it.
Workbench is the visual tool we’ll use as beginners.
5: Verify Installation (Critical Step)
This is how you confirm everything worked.
Verification Method 1: Using MySQL Workbench (Recommended)
- Open MySQL Workbench
- Click Local Instance
- Enter the root password
If:
- Workbench opens
- You see a query editor
Then:
MySQL is installed correctly.
Verification Method 2: Using Command Line
Open Terminal (macOS) or Command Prompt (Windows) and run:
mysql --version
If a version number appears, MySQL is installed.
Then try:
mysql -u root -p
Enter your password.
If you see the MySQL prompt:
mysql>
Then:
MySQL Server is running and accessible.
If Something Does Not Work
Problem: Access Denied
- Password is incorrect
- Caps Lock may be on
Problem: Command Not Found
- MySQL is installed, but not added to PATH
- Use MySQL Workbench instead
Problem: Cannot connect
- MySQL Server is not running
- Start the service (Windows) or enable it in System Settings (macOS)