VMware ESXi and vSphere Cluster Management
Install and Configure MySQL Community Server on Windows
Learn how to download, install, configure, and verify MySQL Community Server on Windows using MySQL Installer, Workbench, and MySQL Shell.
This lesson explains how to install MySQL Community Server locally on a Windows computer. You will select MySQL products, configure the server, create administrative credentials, register MySQL as a Windows service, and verify the installation with a client connection.
MySQL Server is the database engine. It stores data and accepts connections from client applications. MySQL Workbench is a graphical client for administering databases, while MySQL Shell is a command-line client. These tools are optional products that can be installed alongside the server.
Installation overview and prerequisites
MySQL installed on Windows normally runs as a Windows service. A Windows service is a background process managed by Windows. When configured for automatic startup, MySQL can start when Windows starts and continue running after you log out.
Use a supported 64-bit Windows edition. Current MySQL releases commonly support Windows 10 and Windows 11 editions listed in their official system requirements; always check the requirements for the exact MySQL release you plan to install. You also need administrator permissions to install products, add services, initialize the data directory, and make firewall or system changes.
Before beginning:
- Check whether MySQL Server is already installed.
- Open the Windows Services management interface and look for an existing MySQL service.
- Check whether another MySQL instance or application is using the default database port, commonly 3306.
- Close unnecessary database tools and save any existing database work.
- Decide whether you need only a server or also want graphical and command-line client tools.
Download MySQL Community Server
Go to the official MySQL downloads area and select MySQL Community Server. This is the free, community edition of the MySQL relational database server and is distributed under the GPL.
- Select Windows as the target operating system.
- Choose the release series appropriate for your project and operating system.
- Choose either the web installer or the full installer.
The web installer is a smaller download. It downloads selected products and prerequisites during setup, so it requires an internet connection while the installation runs. The full offline installer includes more installation files and is useful when you need to install without a reliable connection or on multiple machines.
The download page may offer an Oracle account. An account is not always required to download the installer; use the available option to continue without signing in when the download page provides one.
Start MySQL Installer
After downloading the installer, locate the executable in Windows File Explorer. Right-click it and choose the option to run it with administrator permissions if Windows requests elevation.
- Accept the license agreement after reading it.
- Choose the products and setup type.
- Review the product list and install the selected components.
- Configure MySQL Server, including networking, accounts, and the Windows service.
- Apply the configuration and finish the wizard.
The installer workflow is generally divided into product selection, installation, server configuration, and completion. Some screens may vary by MySQL release or by the products selected.
Select a setup type and products
The setup type determines which products MySQL Installer selects for you. You can adjust the selection with a custom setup.
| Setup type | Typical components | Best use case |
|---|---|---|
| Developer Default | MySQL Server, MySQL Workbench, MySQL Shell, connectors, and development tools | A beginner or developer who needs a local server and client tools |
| Server Only | MySQL Server and required server components | A machine that will host the database server without graphical tools |
| Client Only | Client applications, connectors, and related tools without the server | A computer that connects to a MySQL server elsewhere |
| Full | Most available MySQL products, documentation, samples, and tools | A broad local installation where disk space is available |
| Custom | Only the products you explicitly select | Controlling the installation closely or meeting a specific project requirement |
For a typical local development setup, choose Developer Default. It normally provides both MySQL Server and MySQL Workbench, making it possible to administer the server graphically. MySQL Shell, connectors, documentation, and samples may also be included depending on the release and selected products.
Choose Server Only when you want the database engine without optional graphical tools. You can then use MySQL Shell, another approved client, or tools installed separately. A custom setup is useful when you need a specific connector for an application language or want to limit installed components.
Install the selected components
Review the product list before continuing. Confirm that MySQL Server is selected and add Workbench or Shell if you need them. The installer then performs an execution step that downloads or installs prerequisites and the selected MySQL components.
- Review product names, versions, and installation locations.
- Start the execution or installation step.
- Wait for each product to report successful completion.
- If the installer requests a prerequisite, install it before continuing.
- Retry any failed component installation and confirm that it succeeds before entering server configuration.
A prerequisite may be a Windows runtime library or another installer dependency. Follow the installer's request, allow Windows to complete the prerequisite installation, and restart MySQL Installer with administrator permissions if necessary.
Configure the MySQL Server
The configuration wizard defines how the server behaves after installation. For a normal personal development computer, choose a standalone server configuration unless your project requires a special topology or deployment arrangement.
Configure networking
Enable TCP/IP networking so clients can connect to the server using the network protocol MySQL expects. A port is a numbered network endpoint. MySQL commonly uses port 3306.
- Keep port 3306 when no other MySQL instance or application uses it and your project has no special port requirement.
- Choose an unused port when 3306 is occupied or another local service must retain it.
- Record the selected port because Workbench, Shell, and application connection settings must use the same value.
For local-only development, do not expose MySQL unnecessarily to other computers. Windows Firewall may allow local connections while blocking remote access. If remote clients are required, explicitly review the server bind settings, firewall rules, network exposure, and account privileges. Opening a database port to a network should be an intentional security decision.
Set authentication and the root password
The root account is MySQL's high-privilege administrative database account. It is separate from the Windows Administrator account. Create and confirm a strong, unique root password during configuration.
Store the password in a password manager or another secure credential store. Do not put it in source code, commit it to a repository, or share it in an unsecured message.
The installer may also allow you to create an additional MySQL user. For ordinary development and application connections, use a separate account with only the permissions it needs. Keep root for administration when practical.
Choose the Windows service settings
Give the service a name such as the installer's suggested MySQL service name. The name must not conflict with an existing MySQL service. If multiple MySQL versions or instances are installed, use distinct service names so Windows can manage them separately.
- Automatic startup: Windows starts MySQL in the background when the computer starts. This is convenient for local development and allows the service to continue after user logoff.
- Manual startup: MySQL starts only when you start it yourself through Windows service management or another supported method. This can conserve resources when you use the server occasionally.
| Setting | Typical default or choice | Why it matters |
|---|---|---|
| TCP/IP networking | Enabled | Allows MySQL clients to connect using the standard network protocol |
| MySQL port | 3306 unless it is occupied | Clients must use the same port as the server |
| Root password | A strong, unique password | Protects the administrative database account |
| Additional user account | Optional limited-privilege user | Supports safer routine development and application access |
| Windows service name | The installer's suggested name or a unique name | Lets Windows identify and manage the server instance |
| Automatic service startup | Enabled for many local development setups | Starts MySQL in the background after Windows starts |
Apply configuration and finish setup
Continue to the configuration execution step and apply the changes. Depending on the selected options, this step can initialize the MySQL data directory, create system data and accounts, register the Windows service, and start the server.
- Start the configuration execution.
- Wait for each action to report success.
- Read any warning or error before continuing.
- Finish the wizard only after all required configuration actions succeed.
The data directory is the filesystem location where MySQL stores database files and server data. Do not delete or move it casually; doing so can make existing databases unavailable.
Verify the installation
Check the Windows service
Open the Windows Services management interface and locate the service name chosen during configuration. Its status should be Running. From this interface you can start, stop, restart, or inspect the service when needed.
Connect with Workbench or MySQL Shell
Open MySQL Workbench or MySQL Shell and create a local connection with these values:
- Host:
localhost, meaning the current computer - Port:
3306, unless you selected another port - Username:
rootor the separate MySQL user you created - Password: the password assigned during server configuration
A successful local connection means the client can reach the running server, authenticate the selected MySQL account, and open a session. Run this SQL query to confirm the server responds and identify its version:
SELECT VERSION();
The query should return one row containing the MySQL server version. This verifies more than an installed program file: it confirms that the service is running, the host and port are correct, the account can authenticate, and the server can execute SQL.
| Check | How to verify | Expected result |
|---|---|---|
| Installer completion | Review the final MySQL Installer results | Selected products and configuration actions report success |
| Windows service status | Locate the configured service in Windows Services | The service is running |
| Local client connection | Connect from Workbench or MySQL Shell with localhost and the configured port | The client opens a MySQL session |
| Server version query | Run SELECT VERSION(); | The server returns its version |
Practical installation examples
Typical local development setup
- Select Developer Default so MySQL Server and Workbench are installed together.
- Keep TCP/IP enabled.
- Retain port 3306 if it is available.
- Set a strong root password and optionally create a separate development user.
- Configure automatic startup for the MySQL Windows service.
- Open Workbench and connect to
localhoston the configured port. - Run
SELECT VERSION();to verify the connection.
Server-only installation
Select Server Only or Custom, install MySQL Server without optional graphical tools, and test the service with MySQL Shell or another approved client. This is appropriate when client software is managed separately or the computer is intended primarily to host the database engine.
Installation with a port conflict
If port 3306 is already in use, identify whether the listener is an existing MySQL instance or another application. Stop or reconfigure it only if appropriate. Otherwise select an unused port during MySQL configuration and use that exact port in Workbench, Shell, and application connection profiles.
A safer day-to-day account
Use root for administrative setup, then create a separate account limited to the development database. Configure application code to use that limited account rather than root. This reduces the impact of an accidental destructive query or exposed application credential.
Post-installation basics
- Manage the running server through the Windows Services interface.
- Manage server behavior through the installed MySQL configuration files and supported administration tools.
- Manage users and privileges through Workbench, MySQL Shell, or SQL statements.
- Store connection profiles in Workbench or your approved client.
- Record the installed MySQL version, port, Windows service name, data directory location, and account details in a secure project record.
- Keep MySQL updated through official releases, and review release compatibility, application drivers, backups, and migration requirements before upgrading.
Troubleshooting
A prerequisite is missing
The installer may require a Windows runtime library or another dependency. Install the prerequisite requested by the installer, restart the installer with administrator permissions, and retry the failed step. Do not proceed to server configuration until the required component reports successful installation.
The selected port is already in use
Another MySQL instance or unrelated application may be listening on the selected port. Stop or reconfigure the conflicting service when appropriate, or choose an unused MySQL port. Update every client and application connection profile to match the new port.
The MySQL service does not start
Check the service status in Windows Services. Common causes include a conflicting service name, an unavailable port, or a failure while creating the data directory. Review the MySQL error log and installer results, correct the service name, port, or configuration problem, and rerun configuration when necessary.
Workbench cannot connect
- Confirm that the MySQL service is running.
- Use
localhostand the configured port. - Verify the MySQL username and password, remembering that the MySQL root account is not the Windows Administrator account.
- Review firewall settings if the connection originates from another computer.
The root password was forgotten
Use the documented MySQL account-recovery procedure appropriate to the installed version. Secure the server while performing password-reset work, then set and securely store a new strong password. Avoid deleting the data directory as a shortcut, because it contains database files.
Key terms
- MySQL Community Server: The free community edition of the MySQL relational database server.
- MySQL Installer: The Windows application used to select, install, and configure MySQL products.
- MySQL Server: The database engine that stores data and accepts client connections.
- MySQL Workbench: A graphical client used to connect to MySQL servers and administer databases.
- MySQL Shell: A command-line client for administering and querying MySQL.
- TCP/IP: The network protocol used by MySQL clients to connect to the server.
- localhost: The current computer, used for a locally installed server.
- connector: A driver or library that lets an application language or tool communicate with MySQL.
For this Windows procedure, keep the installation reference at Install MySQL on Windows.