How to Install MySQL on a Windows Computer

Installing MySQL on a Windows computer is a straightforward process, however selecting the right options is key for a smooth setup.

This is a simple how to for installing MySQL Community Server and MySQL Workbench on Windows. I recommend you walk through this yourself if learning MySQL and the configurations involved with administration. A lot of the configuration can be changed post install too.

Installing MySQL on Windows

Step 1: Download and Launch the MySQL Installer

Download the latest MySQL Community Server from the official MySQL website.

Run the downloaded MySQL Installer (.exe) file.

MySQL install msi file

Accept the License Agreement and click Next.

MySQL License Agreement Windows

Step 2: Choose Setup Type

Recommended: Select Custom Install to install only the components you need.

MySQL Install Choose Setup

Step 3: Select Features to Install

Choose the following:
MySQL Server
MySQL Workbench
MySQL ODBC Driver (optional for applications needing ODBC connectivity)

MySQL Install Feature Selection

Step 4: Install Required Dependencies

If prompted, install Microsoft Visual C++ Redistributable.

Click Exectute to install all features selected.

MySQL Install Features - Ready
MySQL Installing

Step 5: Configure MySQL Server

High Availability: Choose Standalone MySQL Server.

MySQL Install High Availability

Select Development Computer as Config Type.

MySQL Install Server Config Type

Keep default Port 3306.

MySQL Install Networking

Choose Strong Password Encryption (recommended for security).

MySQL Install Authentication Type

Set the Root Password: Enter a secure password for the MySQL root user.

MySQL Install Root Password

Run as Windows Service: Select the default account or use a custom user.

MySQL Install Run As Account

Click Next and then Execute to apply configurations.

MySQL Install Applying Config Update

Step 6: Verify Installation

Review the installation log to confirm success.

MySQL Installation Log

Click Finish to complete the process.

Setting Up MySQL Workbench

Open MySQL Workbench and click + to add a new connection.

MySQL Workbench Add New Connection

Enter a name for your connection (e.g., “Local MySQL 8.0”).

Leave connection settings as default (Host: 127.0.0.1, Port: 3306), at least if you are doing a local MySQL install like I am doing here.

MySQL Workbench New Connection Window

Click Test Connection and enter your root password.

MySQL Workbench New Connection Password
MySQL Workbench Connection Test

Once successful, click OK to save the connection.

MySQL Workbench New Connection

Open the new connection and run SELECT * from sys.version to confirm installation.

MySQL Workbench SELECT Version

Best Practices After Installation

Create New Users: Avoid using the root account for day-to-day tasks.

Enable Backups: Use MySQL Dump or automated backup solutions.

Secure MySQL: Run mysql_secure_installation to enhance security settings.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *