Installing MySQL 8 for Windows

Page update date :
Page creation date :

Operating environment

MySQL
  • MySQL 8.0
Windows
  • Windows 11

Prerequisites

MySQL
  • MySQL 8.0
Windows
  • Windows 11
  • Windows 10
Windows Server
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • Windows Server 2012 R2

Which edition should I use?

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

download

In a web browser, access the following pages:

Click Download MySQL Community Edition.

Click MySQL Community Server.

With "Microsoft Windows" selected, click "Go to Download Page". For some reason, it is an image, so no matter where you click on it, it will transition.

Click the Download button. As for the difference between the top and bottom, it is the difference between installing while downloading at the time of installation or installing the one downloaded in bulk, so in the end both will be the same.

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

install

Run the downloaded file.

Select Yes.

It will be displayed again in a different file, so select "Yes".

Even if it is a production operation, I think that Shell and Workbench may be used in addition to Server, so if you are not sure, "Developer Default" is fine.

This time it didn't come out because it was running in the Windows 11 environment, If you run it on other operating systems, you may experience additional downloads and installations after the above screen.

If you are running the installer while downloading, you will need to download it. Click the Execute button. If you are a full installer, you will not see this screen.

When the download is complete, click the "Next" button.

Click the Execute button to start the installation.

Click the Next button.

Click the Next button.

Product Configuration

Product Composition

We'll now walk through a configuration wizard for each of the following products.

Describes the configuration wizard for each of the following products:

You can cancel at any point if you wish to leave this wizard without configuring all the products.

If you want to exit this wizard without configuring all products, you can cancel at any time.

Select the server configuration type. The availability of other applications on the server on which you install MySQL determines the system resources allocated to MySQL. Choose one of the following according to your application.

Configuration TypeDescription
Development Computer This is your development computer, and many other applications will be installed. MySQL uses the least amount of memory.
Server Computer Several server applications run on this computer. Select this option for a Web server or application server. MySQL memory usage will be moderate.
Dedicated Computer This computer is dedicated to running the MySQL database server. Other servers, such as web servers, are not running. 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.

Here, "Dedicated Computer" is selected on the assumption that it is a dedicated database server.

Select an authentication method. If you don't have a specific reason to do so, select Use Strong Password Encryption for Authentication, which we recommend.

  • Use strong password encryption for authentication (recommended)
  • Use legacy authentication methods (for compatibility with MySQL 5.x)

Set the root password. Note that some symbols may need to be escaped as they are entered.

After entering, click the "Next" button. You can add user accounts later.

Sets the information to be registered with the Windows service. If there is nothing in particular, there is no problem as it is.

Configure the server file permission settings. If there is nothing in particular, there is no problem with the top setting.

The MySQL installer can secure the server's data directory by updating file and folder permissions in the following locations:

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

  • Yes, grant full access only to the user running the Windows service (if applicable) and the Administrators group. Other users and groups do not have access.
  • Yes, but check and configure the level of access.
  • No, you manage permissions after you configure the server.

Click the Execute button to apply the settings.

Click the Finish button.

Click the Next button.

Product Configuration

Product Composition

We'll now walk through a configuration wizard for each of the following products.

Describes the configuration wizard for each of the following products:

You can cancel at any point if you wish to leave this wizard without configuring all the products.

If you want to exit this wizard without configuring all products, you can cancel at any time.

MySQL router configuration. If there are no changes, click the "Finish" button as it is.

Click the Next button.

Check if you can connect to the server. Enter the password you just registered and click the "Check" button. If successful, click the "Next" button.

Click the Execute button to apply the settings.

Click the Finish button.

Click the Next button.

Click the "Finish" button to complete the installation. When each check box is checked, Workbench and Shell are launched, respectively.

Setting Environment Variables

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

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

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

Since the method of opening the environment variable screen differs depending on the version of Windows, it is easier to type "environment variable" in the start menu search.

From the Advanced tab, click the Environment Variables button.

Select from Path System Variables and click the Edit button.

Click the New button.

Enter the folder path where the mysql.exe is located.

All you have to do is click the OK button to confirm.

Checking the operation of the command

Open a prompt and enter the following command: If it succeeds, there is no problem.

mysql --version