How to Install MySQL on Windows

In this MySQL database tutorial, we will learn how to install MySQL in Windows.

MySQL is an open-source Relational Database Management System (RDBMS). It is the most popular and widely used database management system. It has become the go-to choice for millions of developers around the world.

Prerequisites to Install MySQL on Windows

Before we dive into the installation process of MySQL on Windows, it’s essential to ensure you have the necessary prerequisites in place. This will help guarantee a seamless installation experience. The following are the key prerequisites for installing MySQL on Windows:

  1. Supported Windows version: Ensure that your system is running on a supported Windows version. MySQL supports Windows 10/11, Windows Server 2019, Windows Server 2016, and Windows Server 2012 R2.
  2. System requirements: Verify that your system meets the minimum hardware and software requirements for MySQL installation. A typical setup requires at least 2 GB of RAM and 1 GB of free disk space. A faster processor and additional RAM will improve the performance of your MySQL server.
  3. Administrative privileges: To install MySQL, you will need to have administrative privileges on your Windows system. This allows the installer to make necessary system changes and configure the MySQL server properly.
  4. .NET Framework: Ensure that you have the .NET Framework 4.5.2 or higher installed on your system. MySQL Installer for Windows relies on the .NET Framework for its operation.
  5. Visual Studio Redistributable: Download and install the Microsoft Visual Studio Redistributable package (2015, 2017, or 2019) for Visual C++. This is a required dependency for MySQL Server and other MySQL-related products.

Once you have taken care of these prerequisites, you are ready to move forward with the MySQL installation process on your Windows machine.

Install MySQL on Windows

Below are the steps to install MySQL in Windows.

Step 1:

  • To install the MySQL setup, Click on this MySQL official link: https://www.mysql.com/downloads/.
  • Once we click on this link, it will redirect to the next screen (MySQL Cluster CGE). Scroll down and click on the MySQL Community (GPL) Downloads as shown below.
MySQL Installation setup
MySQL Installation setup

Step 2:

  • Once we click on the MySQL Community (GPL) Downloads option, the next below window (MySQL Community Downloads) will display. Click on MySQL Installer for Windows.
MySQL Community Download
MySQL Community Download

Step 3:

  • When we click on the MySQL Installer for Windows option, it will navigate to the MySQL installer page (MySQL Installer 8.0.33). In this window, there will be 2 options:
  1. Windows (x86, 32-bit), MSI Installer [mysql-installer-web-community-8.0.33.0.msi]
  2. Windows (x86, 32-bit), MSI Installer [mysql-installer-community-8.0.33.0.msi]
  • Click on the Download button of the second option (Windows (x86, 32-bit), MSI Installer [mysql-installer-community-8.0.33.0.msi]).
MySQL Windows Installation Setup
MySQL Windows Installation Setup

Step 4: On the next page, we will choose the setup type. We have to select a Full option to install all MySQL products and features. Then click the Next button it will install all MySQL products mentioned in the Setup Type Description in the below image.

MySQL Setup Installation for Windows
MySQL Setup Installation for Windows

Step 5: Now click on Next, it will show us some requirements which were unable to install.

MySQL Installation requirements
MySQL Installation requirements

Step 6: After clicking Next in the previous step, we will see the list of products that are going to install. To install all products we will click Execute button so it will execute all the product’s installations.

MySQL Windows Installer
MySQL Windows Installer

When the installation gets completed, click on the Next button.

MySQL Community Installer
MySQL Community Installer

Step 7: In this step, we need to configure the MySQL server 8.0.32, Now we will click on the Next button so that it will configure our MySQL server.

MySQL Installation setup
MySQL Installation Setup in Windows

Step 8: In this step of the installation, we will get the page Type and Networking setup and it will ask us to choose Config Type and other connectivity options as well. We will choose the config type “Development Computer” and Port Number ‘3306’ and click on Next.

MySQL Installer Server
MySQL Installer Server

Step 9: In this step, we will set up the MySQL password, and after setting the password click on Next.

MySQL Installation account
MySQL Installation account

Step 10: The next step is to configure the Windows Service settings. Keep the Run Windows Service as “Standard System Account” as shown in the below image and click on the Next button.

MySQL Installation Windows Service
MySQL Installation Windows Service

Read Different Datatypes in MySQL

Step 11: In the next step installer will ask us to apply server configuration. We will click on Execute to apply the configurations.

MySQL installation Configurations
MySQL installation Configurations

Step 12: After the configurations will get completed it will look as shown below picture. Click on Finish to continue.

Install MySQL in windows
Install MySQL in Windows configurations

Step 13: In this step, we will enter the password which we created earlier. After entering the password click on the CHECK button. If the connection is successful, it will show Connection succeeded in the Status column and a green tick near the Check button. After that click on the Next button.

MySQL Installer for Windows
MySQL Installer for Windows

Step 14: Our installation is almost completed we will click Finish and complete the installation of MySQL shell, MySQL server, and MySQL Workbench.

MySQL Community Installation
MySQL Community Installation

Step 15: In this step, we will check whether MySQL is installed correctly or not, for that we will open the MySQL command line and enter the code.

MySQL installation cmdline
MySQL installation command line

We can see that in MySQL command line it is showing the server version: 8.0.32. Now, you are connected to the MySQL server, and you can execute all the SQL commands at MySQL

Conclusion:

In this MySQL database tutorial, we learned how to install and set up MySQL on Windows and after the installation, we also checked the installation through MySQL Command-Line to make sure that MySQL is installed properly in our system.

You may also like to read the following articles: