How to Install and Configure MySQL on a Windows Server 2022

In this tutorial, we’ll take a gander at how you can install and configure MySQL on a Windows server 2022 in merely two simple steps. MySQL server is offered in two editions: an open-source MySQL community server edition and an enterprise server edition. We will be using the community server for the tutorial. Let’s begin!

Step 1 –
Download MySQL for your Windows Server 2022

The first step to install and configure MySQL on a Windows Server 2022 is to download the MySQL community server from its official website. You can download MySQL for Windows directly from MySQL.com.

The “MySQL Community Server” edition is free and available for both 32-bit (x86) and 64-bit (x64) operating systems.

Hence, download MySQL for your Windows server 2022 depending upon whether your server runs a 32 or 64-bit Windows operating system. Note that the installer for either version is 32-bit only.

screenshot of MySQL website

The MySQL Community Server installer is available in both web-installer and standalone-installer modes. Hit “Download” after choosing the suitable version of the installer.

screenshot of MySQL website (selecting a MySQL installer)

You will then see the option to sign up or log in to an Oracle Web account. However, you can just click on the “No thanks just start my download” link.

screenshot of MySQL website (login panel)

Step 2 –
Install MySQL Community Server on your Windows 2022 Server

Start the installation process by running the MySQL Installer file. You will see the License Agreement. We recommend you to read it thoroughly and accept it.

Then you’ll be asked to choose a setup type. Since our goal is to configure MySQL on your Windows server 2022, we will go with “Server only”. Also, as a minimum, you need to install the MySQL server.

screenshot of choosing a setup type for MySQL Installer

If you had downloaded a standalone web installer, the selected components will start getting installed. In the case of a web installer, the installer will first download the components and then install them.

screenshot of choosing a product in MySQL Installer

screenshot of details of installation

Now that all the necessary components for setting up MySQL on a Windows server 2022 are installed, let’s get down to configuration.

screenshot of Type and Networking window in MySQL installer

Configuring the MySQL server on your Windows 2022 server is extremely simple. First, you need to select the “Config Type” or Configuration Type. Select the configuration type which is most applicable to your server. If you’re configuring MySQL on your Windows 2022 server where other applications are installed/running, select “Server Machine”. Select “Dedicated Machine” if the server will just be dedicated to MySQL and won’t be running any other applications/services.

In addition, you can configure the server for specific “Connectivity” options. However, you can leave the default configuration(TCP/IP Port 3306) in most cases.

Hit the “Next” button to proceed. You should now be prompted to set up a MySQL root password:

screenshot of Account and Roles window in MySQL installer

The MySQL root password protects your MySQL server from unauthorized changes/access. Hence, it should be a strong and secure password. In addition, you can also add additional MySQL user accounts on this step. The whole idea behind setting up dedicated MySQL user accounts for each service is to configure the server to be used for multiple applications as well as MIDAS.

Then, Hit “Next” and you will see the options to configure MySQL as a Windows Service. This would mean that the server will run automatically whenever Windows starts:

screenshot of Configure Service window in MySQL installer

Check the “Configure MySQL Server as a Windows Service” and “Start the MySQL Server at System Startup” checkboxes. Finally, select the “Standard System Account” radio button.

Finally, click “Next” and you will have configured MySQL on a Windows server 2022 successfully.

screenshot of Apply Configuration window in MySQL installer

screenshot of MySQL in MySQL installer

Conclusion

In this tutorial, we went through the simple and fast way of setting up a MySQL server on a Windows 2022 Server. Set up a MySQL server on your Windows server in these two simple steps and use it seamlessly on your system.

Note: If you are using AWS, GCP, azure etc, make sure to enable the port “3306” in the security inbound rules, to use the MySQL server online (if needed).

Was this article helpful?