To install MySQL under Windows platform, you can use the graphical installation package. The graphical installation package provides a detailed installation wizard to facilitate the user to complete the installation of MySQL step by step. This section describes in detail how to install MySQL using a graphical installation package.
1.2.1 Installing MySQL
To run MySQL in Windows, you need a 32-bit or 64-bit Windows operating system, such as Windows 7, Windows 10, Windows 11, Windows Server 2022, etc. Windows can run MySQL server as a service. Typically, MySQL requires administrator privileges on the system at the time of installation.
There are two types of installations available for the Windows platform: the MySQL binary distribution (.msi installation file) and the no-installation version (.zip compressed file). In general, the binary distribution should be used because it is easier to use than other distributions and does not require any other tools to start up to run MySQL.The following describes the specific installation steps for the MySQL binary distribution.
1. Download the MySQL installation file
The specific steps to download the MySQL installation file are as follows:
Enter the URL "/downloads/mysql/" in the address bar of the browser to open the MySQL Community Server download page, select the Microsoft Windows platform, and click the [Download] button on the right side, as shown in Figure 1.1. Click the [Download] button on the right, as shown in Figure 1.1.
In the pop-up page, directly click the "No thanks, just start my download." link, you can start the download, as shown in Figure 1.2.
2. Install MySQL
After MySQL is downloaded, start installing it as follows:
Double-click the downloaded mysql-9.0.file, as shown in Figure 1.3.
Enter the welcome installation interface, click [Next] (Next) button, as shown in Figure 1.4.
Open the End User License Agreement window, check the [I accept the terms in the License Agreement] (I accept the terms in the License Agreement) check box, as shown in Figure 1.5.
Figure 1.5 End User License Agreement window
Click the Next button to enter the Select Installation Mode window. There are three types of installation listed, Typical, Custom and Complete. Here, click the Custom button, as shown in Figure 1.6.
Enter the custom installation window, click [Browse] (Browse) button, you can customize the installation path, the default settings are used here, as shown in Figure 1.7.
Click the [Next] (Next) button to open the Ready to Install window, click the [Install] (Install) button, as shown in Figure 1.8.
The system automatically installs the MySQL server and displays the installation progress, as shown in Figure 1.9.
After the installation is complete, click the [Finish] button, as shown in Figure 1.10.
1.2.2 Configuring MySQL
After MySQL is installed, you need to configure the server as follows:
In the last step of Section 1.2.1, clicking the Finish button will take you to the Welcome to the MySQL Server Configurator window, as shown in Figure 1.11.
Click [Next] (Next) button to enter the set data save path (Data Directory) window, here you can set the data save path according to their needs, as shown in Figure 1.12.
Click the [Next] button to open the MySQL server type configuration (Type and Networking) window, where the default settings can be used, as shown in Figure 1.13.
Click the Next button to open the Accounts and Roles window, set the password for the MySQL root account, and enter the same login password twice, as shown in Figure 1.14.
Click [Next] (Next) button, open the Windows Service (Windows Service) window, set the server name, in this case, set the server name to "MySQL", as shown in Figure 1.15.
Click the Next button to open the Server File Permissions window, here click the third radio button, as shown in Figure 1.16.
Click [Next] (Next) button to open the creation of database instances (Sample Databases) window, you can check the creation of Sakila, World sample database, there is no check box, shown in Figure 1.17.
Click the [Next] (Next) button to open the Apply Configuration window, click the [Execute] button, as shown in Figure 1.18.
The system automatically configures the MySQL server. After the configuration is complete (Configuration Complete), click the [Finish] button to complete the configuration of the server, as shown in Figure 1.19.