Installing MySQL 8.4 for Windows

Page creation date :

Operation confirmation environment

MySQL
  • MySQL 8.4
Windows
  • Windows Server 2022

Required environment

MySQL
  • MySQL 8.4
Windows
  • Windows 11
  • Windows 10
Windows Server
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016

About the edition you use

There are several editions of MySQL, but this time we will install the "MySQL Community Edition" that can be used for free.

Download and install the Microsoft Visual C++ Redistributable

MySQL 8.4 uses the Microsoft Visual C++ 2019 runtime, so even if you try to install MySQL as is, you will see the following dialog and cannot install it.

Download the runtime from the following site:

If you go down the page, you will find a download link to download it. The architecture should be tailored to the Windows on which MySQL is installed.

Run it once downloaded.

Check the "Accept the License Terms and Terms of Use" box and click the "Install" button.

Download MySQL

In your web browser, go to the following pages:

Click Download MySQL Community Edition.

Click MySQL Community Server.

There are several versions of MySQL, and the one with "LTS" is the long-term supported version. The one marked "Innovation" is short-term support for the latest version only, so please choose the "LTS" version unless you are researching new features.

There are several Download buttons, but if you are not particular about it, please select "Windows (x86, 64-bit), MSI Installer".

You will be asked to log in, but you can download it from the link below without logging in.

Installing MySQL

Run the downloaded file.

If you are not an administrator, you will see a dialog like the one below, select Yes.

Select "Yes" as it will appear again in another file.

Click Next.

Check "I accept the terms in the License Agreement" and click the "Next" button.

Select Typical. If you just want to use it as a database, this is enough.

Click the "Install" button.

Click the Finish button to close it while checking Run MySQL Configurator.

Click the "Next" button.

If there are no changes to the MySQL data storage folder path, click the "Next" button.

Select the type of server configuration. Whether other applications run on the server on which MySQL is installed determines which system resources to allocate to MySQL. Choose one of the following to suit your application:

Description of the type of configuration
Development Computer This is a development computer and many other applications are installed. MySQL uses minimal memory.
Server Computer On this computer, several server applications are running. Select this option for your web or application server. MySQL will have moderate memory usage.
Dedicated Computer This computer is dedicated to running the MySQL database server. Other servers, such as web servers, do not run. MySQL uses all available memory.
Manual Keep the default configuration file values. If you need to change the value, you must edit the configuration file and update it manually.

In this case, "Server Computer" is selected with the assumption that other applications will also be run. Please decide according to how you operate it.

By the way, the choice of configuration type changes the following parameters of the my.ini: The number set may vary depending on the specifications of your PC. You need to be especially careful if the server memory specs are dynamic.

Parameter Name : Manual Development Computer Server Computer Dedicated Computer
tmp_table_size 16M 5M 12M 74M
myisam_sort_buffer_size 8M 9M 16M 138M
read_buffer_size 128K 238 31K 128K
read_rnd_buffer_size 256K 6K 256K 256K
innodb_thread_concurrency 0 8 8 8
open_files_limit 5000 8161 8161 8161

Set a root password. Note that some symbols may require escape processing when typing.

Once you have entered it, click the "Next" button. You can add user accounts later.

Set the information to register with Windows services. If there is nothing in particular, there is no problem as it is.

Set permission settings for server files. If there is no special situation, there is no problem as the top setting.

The MySQL installer can secure the server's data directory by updating the permissions of files and folders located in the following locations:

Do you want to update server file permissions in MySQL installer?

  • Yes, we only grant full access to users running Windows services (if applicable) and the Administrators group. Other users and groups cannot access it.
  • Yes, but check and configure the level of access.
  • No, you manage permissions after server configuration.

Check it out if you want to keep a sample database.

Start the configuration with the "Execute" button.

Click the "Next" button.

Close with the "Finish" button.

Setting Environment Variables

Setting environment variables makes it easier to use commands because you don't have to specify the full MySQL path when executing commands. If you don't want to use commands, you don't have to set environment variables.

Examine the folder where mysql.exe is installed. If you haven't changed anything, it should be in the following folder.

  • C:\Program Files\MySQL\MySQL Server 8.4\bin

Different versions of Windows have different ways to open the environment variables screen, so it's easier to type "environment variables" in the Start menu search.

From the Advanced tab, click the Environment Variables button.

Select from Path the system environment variables and click the Edit button.

Click the "New" button.

Enter the folder path with mysql.exe.

After that, click the OK button to confirm.

Verify command operation

Open the prompt and enter the following command: If you succeed, there is no problem.

mysql --version