Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

The simplest current way to install MySQL on Windows is to download the official 64-bit MySQL Community Server MSI, run it as an administrator, and complete the bundled MySQL Configurator. The configurator creates the data directory, sets a root password, configures networking, and can install MySQL as a Windows service.

This guide follows the MySQL 9.7 workflow documented by MySQL as of August 2026. Version numbers, download sizes, default paths, and screen labels can change. Installing MySQL Workbench alone is not enough: Workbench is a graphical client, while MySQL Server is the database engine.

What you are installing

  • MySQL Server: The database engine that stores data and executes SQL.
  • MySQL Workbench: An optional graphical tool for SQL, administration, and schema design.
  • MySQL Shell: An advanced command-line interface.
  • Connectors: Libraries that let applications written in Python, Java, .NET, Node.js, C++, and other languages connect to MySQL.

For a normal local development setup, install MySQL Community Server first. Add Workbench if you prefer a GUI.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before you install

For the current MySQL 9.7 Windows release, MySQL documents support for 64-bit Windows only and requires the Microsoft Visual C++ 2019 Redistributable. You should also have:

#1 Best Overall
Sale
Microsoft Windows 11 (USB)
  • Less chaos, more calm. The refreshed design of Windows 11 enables you to do what you want effortlessly.
  • Biometric logins. Encrypted authentication. And, of course, advanced antivirus defenses. Everything you need, plus more, to protect you against the latest cyberthreats.
  • Make the most of your screen space with snap layouts, desktops, and seamless redocking.
  • Widgets makes staying up-to-date with the content you love and the news you care about, simple.
  • Stay in touch with friends and family with Microsoft Teams, which can be seamlessly integrated into your taskbar. (1)
  • Administrator permission to install software and create a Windows service.
  • Enough disk space for the program files, data directory, logs, and databases.
  • A free TCP port, normally 3306.
  • A secure password that you can store safely.

Do not use an empty root password for a normal installation, and do not expose a local MySQL port to the public internet.

Choose the correct download

Situation Recommended package
Most current Windows installations 64-bit MSI
Portable, scripted, or manually controlled installation 64-bit ZIP archive
MySQL 8.0 with several bundled MySQL products MySQL Installer
Offline MySQL 8.0 installation Full MySQL Installer bundle

Download the current Community Server packages from the official MySQL Windows download page. The research checked for this guide identified MySQL Community Server 9.7.1 LTS, including mysql-9.7.1-winx64.msi and a ZIP archive. Recheck the page immediately before downloading because versions and file sizes change.

MySQL says that 8.0 was the final series supported by the older all-in-one MySQL Installer. For MySQL 8.1 and later, use the product-specific MSI or ZIP archive instead of following an old tutorial that treats MySQL Installer as universal.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install MySQL with the Windows MSI

1. Download and launch the MSI

Download the 64-bit MSI from the official page and double-click the file. Approve the Windows security prompt. If it does not launch normally, right-click the MSI and choose Run as administrator.

2. Choose the installation folder

The documented default program directory for MySQL 9.7 is:

C:Program FilesMySQLMySQL Server 9.7

You can choose another location, but avoid changing it without a reason. The program directory contains executables such as mysqld.exe and mysql.exe. The data directory contains databases, logs, and other server data; it is separate conceptually and may not be in the same folder.

3. Open MySQL Configurator

The current MSI installs MySQL Configurator. Launch it when the installer offers to do so. Installing the files and configuring the server are separate stages: MySQL may not start until Configurator has created the data directory, configuration, root account, networking settings, and service.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Select server resources

Choose the server type that matches how you will use the computer. A development-oriented choice is normally appropriate for a local laptop or desktop because it uses settings intended to leave resources available for other applications. Exact labels can differ between versions.

Rank #2
SANDISK 128GB Ultra Flair, USB-A Flash Drive, Up to 150MB/s Read Speeds
  • High-speed USB 3.0 performance of up to 150MB/s(1) [(1) Write to drive up to 15x faster than standard USB 2.0 drives (4MB/s); varies by drive capacity. Up to 150MB/s read speed. USB 3.0 port required. Based on internal testing; performance may be lower depending on host device, usage conditions, and other factors; 1MB=1,000,000 bytes]
  • Transfer a full-length movie in less than 30 seconds(2) [(2) Based on 1.2GB MPEG-4 video transfer with USB 3.0 host device. Results may vary based on host device, file attributes and other factors]
  • Transfer to drive up to 15 times faster than standard USB 2.0 drives(1)
  • Sleek, durable metal casing
  • Easy-to-use password protection for your private files(3) [(3)Password protection uses 128-bit AES encryption and is supported by Windows 7, Windows 8, Windows 10, and Mac OS X v10.9 plus; Software download required for Mac, visit the SanDisk SecureAccess support page]

5. Configure networking

For a normal local connection, use:

Protocol: TCP/IP
Port: 3306

Port 3306 is the conventional default, not a requirement. If another service is using it, choose an unused port such as 3307, record the value, and use it consistently in Workbench, application connection strings, and diagnostic commands.

6. Set the root password

Create a strong, unique password for the MySQL root account. This is a MySQL account; it is not the same thing as your Windows administrator account. You will need this password to perform administrative tasks and test the installation.

Enter the password interactively when connecting:

mysql -u root -p

Do not put the password directly after -p. Although mysql -u root -pYourPassword may work, it can expose the password in shell history or process information.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

7. Install the Windows service

For most local users, configure MySQL as a Windows service and enable automatic startup. This allows Windows to start MySQL after a reboot.

The service name is version-dependent. Configurator may create a name such as MySQL97; do not assume it is always simply MySQL. Confirm the actual name in the Windows Services app before using service commands.

8. Finish configuration

Complete the configurator and wait for it to start the server. A successful setup should create a service, create a configuration file, initialize the data directory, and allow the root account to authenticate.

Verify that MySQL works

Test the client

Open a new PowerShell or Command Prompt window and run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
mysql --version

If Windows reports that mysql is not recognized, the server may still be installed correctly; the client directory simply is not on your PATH. The fix appears below.

Rank #3
Microsoft Windows 11 PRO (Ingles) FPP 64-BIT ENG INTL USB Flash Drive
  • MICROSOFT WINDOWS 11 PRO (INGLES) FPP 64-BIT ENG INTL USB FLASH DRIVE

Connect to the server

mysql -u root -p

Enter the password created during configuration. A successful connection displays a prompt similar to:

mysql>

Run a basic test:

SELECT VERSION();
SHOW DATABASES;

Exit with:

exit;

MySQL’s postinstallation documentation also describes using mysqlshow -u root -p to verify access.

Check the Windows service

In PowerShell:

Get-Service *mysql*

In Command Prompt:

sc query type= service state= all | findstr /I mysql

To start a service, replace the example name with the name shown in Services:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
net start MySQL97

To stop it:

net stop MySQL97

Check the port

Test-NetConnection 127.0.0.1 -Port 3306

A working local TCP connection should show:

TcpTestSucceeded : True

Substitute your configured port if you chose something other than 3306.

Add MySQL to PATH

If mysql.exe is installed but mysql is not recognized, run it using its full path:

& "C:Program FilesMySQLMySQL Server 9.7binmysql.exe" -u root -p

Alternatively, add this version’s bin directory to the Windows PATH:

C:Program FilesMySQLMySQL Server 9.7bin

After changing PATH, close and reopen the terminal. If you have multiple MySQL versions, be careful: adding several bin directories can cause the client from one version to connect to a server from another. MySQL documents this risk in its Windows PATH guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Connect with MySQL Workbench

Workbench is optional. Install it from the official MySQL downloads page, then create a local connection with:

Rank #4
JOIOT 128GB USB C Flash Drive Dual USB 3.0 Flash Drive Type C + USB A Portable Type-C Flash Drive 2-in-1 USB-C Thumb Drive for Smartphone Tablet Computer Mac iPhone 15 Black
  • [Dual Flash Drive] This 2-in-1 USB flash drive is designed with a Type-C plug and a USB-A plug at each end, working across all your Type-C Android phones, iPhone 15/15 Pro/15 Pro Max, iPhone 16/16Pro/16E, tablets, iPad Pro, Macs and USB-A computers, game consoles, car audios, and more (Not for Lightning iPhone/iPad).
  • [Fast Speed] Optimizing the USB 3.0 technology, this USB-C flash drive fast transfers and backs up your high-res photos, videos, music, and heavy files at a read speed of up to 130MB/s and a write speed of up to 35MB/s, 10X faster than USB 2.0 flash drives.
  • [Wide Use] This Type-C flash drive supports Windows, Android, Linux, and Mac OS, and is backward compatible with USB 2.0 ports. Plug and play, no need to install any software, working seamlessly with USB-C and USB-A devices.
  • [Durable and Reliable] This dual USB 3.0 flash drive adopts superb memory chips thus ensuring extremely reliable performance, plus the premium plastic enclosure offers excellent heat dissipation. The cap protects the connectors from dust and damage, providing extended durability and security.
  • [Compact and Portable] Constructed in a mini size of 63.5x17.8x8.4mm/2.5x0.7x0.3inch, this slim USB-C thumb drive can fit into your pocket, letting you enjoy the instant large capacity at any time.
  • Hostname: 127.0.0.1
  • Port: 3306, or the port selected during configuration
  • Username: root
  • Password: The password created during configuration

Using 127.0.0.1 is useful while diagnosing local TCP connections because some clients treat localhost differently.

Manual installation from the ZIP archive

Choose the ZIP archive only when you need a portable, scripted, custom, or multiple-instance installation. The MSI plus Configurator is safer for most beginners because it handles initialization and service setup.

A manual installation generally requires you to:

  1. Download and extract the 64-bit ZIP archive, for example to C:mysql.
  2. Create a configuration file such as C:mysqlmy.ini with the intended base and data directories.
  3. Initialize the data directory securely.
  4. Start mysqld and set or confirm the root password.
  5. Optionally register the server as a Windows service.
  6. Test with the matching client and port.

Do not copy a partial ZIP procedure into a production or important development environment without deciding where basedir, datadir, logs, permissions, and configuration files belong. MySQL’s manual Windows startup documentation covers the details.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For an already initialized manual installation, an administrator can register a service with:

"C:mysqlbinmysqld" --install MySQL97

This creates the service but does not start it:

net start MySQL97

Remove that service later with:

sc delete MySQL97

Never delete the data directory as a generic troubleshooting step.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

Symptom What to check Likely fix
mysql is not recognized Whether the MySQL bin directory is on PATH Use the full executable path or add the correct version’s bin directory to PATH.
Access denied for root Password, host, port, and which server instance is running Use mysql -u root -p and enter the configured password.
Service will not start Windows Services, the error log, data directory, port, and configuration file Resolve the reported configuration, permission, runtime, or port problem; do not delete the data directory.
Port 3306 is occupied Which process owns the port Stop the conflicting service if appropriate or configure MySQL and all clients to use another port.
Workbench cannot connect Hostname, port, service status, username, and password Test first with 127.0.0.1 and the same port using the command-line client.

The server installed but will not start

Inspect the MySQL service and error log first. Check that the data directory exists, the configuration file points to valid paths, and the Visual C++ runtime is installed. To see whether another process owns port 3306:

netstat -ano | findstr :3306

Then identify the process:

tasklist /FI "PID eq <PID>"

A previous MySQL installation, stale service, invalid path, permissions problem, or missing runtime can all prevent startup. Re-run MySQL Configurator or its reconfiguration option where appropriate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You receive “Access denied for user ‘root’”

Confirm that you are connecting to the intended instance and using:

Best Value
Sale
128GB Flash Drive Aiibe USB Flash Drive 128 GB Thumb Drive USB 2.0 Memory Stick Zip Drive Backup Jump Drive Single 128GB 128G USB Drive for PC Laptop
  • Large Data Storage Capacity: Flash Drive with 128GB capacity, meet your needs of daily use on work, school, home and travelling for photos, music, videos, files storage and transfer
  • Easy to use: The thumb drive is plug and play without any software installation; Supports Windows 7/8/10 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, also compatible with USB 2.0 and 1.1 ports; Storage is fast, safe and stable
  • Wide Compatibility: USB flash drive support TV, desktop, notebook computer, car, audio and other device; It is your great data storage and transfer companion with traveling and working
  • Retractable Desgin: The usb drive's retractable design can effectively protect the USB interface; The capless design can avoid losing of cap; Weight: 7g, Size: 2.6 × 0.8 × 0.4 inch. Portable to take your digital world anywhere
  • What You Get: 1 x 128GB USB Flash Drive Thumb Drive, All of usb drives have been rigorously tested and formatted before leaving the factory; The default format of the USB stick is exFAT
mysql -u root -p

MySQL documents error 1045 as commonly indicating an incorrect password or a root account that already has a password. If you initialized a server with --initialize-insecure, the root account starts without a password; set one immediately rather than leaving it that way.

If you forgot the password, follow MySQL’s official Windows password-reset procedure. It involves stopping the server, starting it temporarily with an SQL initialization file, changing the password, deleting that file, and restarting normally.

You installed multiple MySQL versions

Multiple versions can have similar service names, conflicting ports, and different clients on PATH. Confirm the exact service, executable path, port, and server version with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
mysql --version
SELECT VERSION();

For carefully isolated versions, a manually controlled ZIP installation may provide more flexibility than the older MySQL Installer workflow.

Create a separate application user

Applications should not normally connect as root. After testing the installation, create a database and a dedicated account:

CREATE DATABASE example_app;

CREATE USER 'example_app'@'localhost'
IDENTIFIED BY 'Use-a-long-unique-password-here';

GRANT ALL PRIVILEGES ON example_app.*
TO 'example_app'@'localhost';

FLUSH PRIVILEGES;

Replace the sample password with a different strong secret. Store credentials in protected environment variables or a secrets manager, not in source code or public configuration files.

Uninstall or reinstall safely

Back up databases before removing or reconfiguring MySQL. Stop the service and identify the data directory before uninstalling program files. Removing the MSI or program directory does not necessarily remove every database file, configuration file, or service.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not delete folders such as C:ProgramDataMySQL or the configured data directory unless you have confirmed that the databases are backed up and intentionally want to destroy that instance’s data.

Alternatives to a native Windows installation

  • Docker: Useful for reproducible, disposable project environments, but requires Docker Desktop, a persistent volume, port mapping, and container knowledge.
  • WSL: Useful for a Linux-like development workflow, but it is a separate environment rather than a native Windows service.
  • Managed MySQL: Appropriate for production applications needing managed backups, monitoring, or scaling, not usually for a local laptop database.
  • MariaDB: Consider it only when your application explicitly supports it; compatibility depends on SQL features, authentication, connectors, and versions.

The Bottom Line

For most Windows users, install the current 64-bit MySQL Community Server MSI, complete MySQL Configurator, use a strong root password, keep MySQL as an automatic Windows service, and verify it with mysql -u root -p. Add Workbench only when you want a graphical client, and use a separate database account for applications.

Quick Recap

SaleBestseller No. 1
Microsoft Windows 11 (USB)
Microsoft Windows 11 (USB)
Make the most of your screen space with snap layouts, desktops, and seamless redocking.; FPP is boxed product that ships with USB for installation
$128.99
Bestseller No. 2
SANDISK 128GB Ultra Flair, USB-A Flash Drive, Up to 150MB/s Read Speeds
SANDISK 128GB Ultra Flair, USB-A Flash Drive, Up to 150MB/s Read Speeds
Transfer to drive up to 15 times faster than standard USB 2.0 drives(1); Sleek, durable metal casing
$25.95
Bestseller No. 3
Microsoft Windows 11 PRO (Ingles) FPP 64-BIT ENG INTL USB Flash Drive
Microsoft Windows 11 PRO (Ingles) FPP 64-BIT ENG INTL USB Flash Drive
MICROSOFT WINDOWS 11 PRO (INGLES) FPP 64-BIT ENG INTL USB FLASH DRIVE
$149.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.