Windows Mysql installation Configuration method graphics and text tutorial _mysql

Source: Internet
Author: User
Tags mysql in root access

Installation and configuration under Windows MySQL detailed steps of thinking, to share with you for your reference, the specific content as follows

This article describes the installation and configuration under Windows XP.

To run MySQL in Windows, you need to:

Ø 32-bit Windows operating system, such as 9x, Me, NT, 2000, XP, or Windows Server 2003.

Windows NT based operating system (NT,2000,XP,2003), which runs the MySQL server as a service. It is highly recommended that you use a Windows NT based operating system.

ØTCP/IP protocol support (perhaps the basic requirements for all database systems).

Øwindows version of the MySQL binary distribution, can be downloaded/downloaded from

Ø can read the. zip file tool to extract the distribution file.

Ø There is enough space on your hard disk to ensure that you unpack, install, and create a database based on your requirements (it is generally recommended that you have at least 200 megabytes).

Ø If you plan to connect to the MySQL server via ODBC, you will also need a connector/ODBC driver.

Ø install MySQL on NTFS or an updated file system if the table needs to occupy more than 4GB of space. Do not forget to use max_rows and avg_row_length when creating tables.

Under the Windows platform, it is recommended (especially for beginners) to use the MSI installation file, which automatically completes the configuration under the graphical interface and is registered as a Windows service. On the MySQL official website find the MSI installation file download address under Windows platform, download to local. It is necessary to verify the MD5 value of the file to reduce unnecessary trouble caused by corrupted files or tampering.

After all the preparations have been completed, start installing the MySQL operation.

1. Double hit open already downloaded MySQL installation files, the system pops up as shown in Figure 1 to install the interface, a moment later is undoubtedly welcome interface (as shown in Figure 2).

Figure 1

It is said that the logo of MySQL-Penguin, named "Sakila."

Figure 2

2. Click the "Next" button in Figure 2 to continue installing MySQL, at which point you need to choose the type of installation (as shown in Figure 3). at this point the installation type is mainly for different (application) degree of users, the system default "typical" (typical), the user can choose "Complete" (All) or "custom" (user-defined), where we choose "Custom" To facilitate configuration (in fact, the main MySQL installation path).

Figure 3

3. Click the "Next" button in Figure 3 to enter the custom installation interface as shown in Figure 4. Since then, the user can choose all the MySQL components that need to be installed, the system will select all the components that must and commonly used, only "Developer components" (development component), the default is the user can choose to install, for most users, this component does not need to install.

Figure 4

4. Click the "Change ..." button in Figure 4 to eject the Path selection window (Figure 5), changing the MySQL installation path. the user can either select the installation path from the "Look in" Drop-down list above, or enter the installation path directly in the folder name text box. The author uses "D:/mysql/mysql Server 5.1/" as the installation path.

Figure 5

Description: The system defaults to the MySQL Server service and data files installed in two different directories, so users need to set the "MySQL server" and "MySQL server datafiles" path, set the same method.

5. After selecting the path, click OK to go back to Figure 4, click on the "Next" button and go to the ready installation interface as shown in Figure 6. Figure 6 shows the installation type, destination folder, Data folder, and so on. If the user feels a problem, you can click the Back button to return to the Setup Settings screen shown in Figure 4 to select a variety of information.

Figure 6

6. If the user feels that there is no problem, you can click the "Install" button to install the MySQL operation. The Installation Wizard interface, as shown in Figure 7, is displayed, and the user simply waits for the system to be automatically installed.

Figure 7

Description: in the 5.1.41 version of the installation process, the system will pop up the MySQL enterprise information, the user simply click the "Next" button, you can complete the button process.

7. After the Setup Wizard completes, the system pops up the Setup Wizard window as shown in Figure 8.

Figure 8

There are two check buttons in this window, the first "Configure the MySQL server Now" is the option to set up the MySQL service, which is recommended to be selected so that the MySQL service can be configured immediately; the second "Register the MySQL server" is a registered account, this button can be selected according to individual needs, if the installation of the target machine can not be on the network, this button even if the choice can not register. The system default two check buttons are all selected, the author recommends only select the first.

8. Click "Finish" button to set the MySQL server instance. the same is the welcome interface for the MySQL Server Instance Setup wizard (Figure 9, which seems to be the case of MySQL as a separate product).

Figure 9

9. Click the "Next" button to select the type of setting (Figure 10). It is recommended that you use the default "Detailied Configuration".

Figure 10

10. Click the "Next" button, choose the MySQL service type (Figure 11), depending on the choice of the CPU and hard drive will have a different impact.

Figure 11

If the program developer needs to use the MySQL database, the author recommends that the "Developer Machine" mode be selected to reduce the occupancy rate of the resource; if there are multiple different services on the server, select "Server Machine"; If the server is just a database server, You can choose "Dedicated MySQL Server Machine".

11. Click "Next" to enter the database Purpose selection interface (Figure 12) and recommend using the default "multifunction database" (multipurpose databases).

Figure 12

12. Click the "Next" button to select the location of the InnoDB data file. Users can store according to their own needs.

Figure 13

13. Click "Next" to select the number of simultaneous connections.

Figure 14

If you are using the development machine for the programmer, select "Manual Setting" and use the default 15 or manually enter the number of connections (the number of connections can be set according to your actual needs); If you select "Decision Support (DSS)/olap", The system automatically sets up to 20 active connections, and if you select Online Transaction processing (OLTP), the system automatically sets up to 500 active connections.

14. Click "Next" to set up network configuration information (Figure 15), mainly TCP/IP network ports.

Figure 15

The port recommends using the default 3306. The other "Enable Strict Mode" Check button recommends that you use the default selection. The check button "ADD firewall exception for this port" is used to inform the firewall that the specified port is allowed to access the network, and if this button is not selected, it may cause service configuration and startup exceptions.

15. Click the "Next" button to set the encoding format used for the database, and it is recommended to use the "UTF8" encoding format to ensure that the system adapts to the application and versatility of various environments.

Figure 16

Because the configuration wizard may use different default encoding formats depending on the system, it is recommended that you select the Manual Selected default Character set/collection, the radio button, and manually set the encoding format to "UTF8".

16. Click the "Next" button to set whether MySQL is registered as a system service and whether to place the MySQL path into the system environment variable.

Figure 17

It is recommended that MySQL be installed as a Windows system service, if the developer, it is recommended that the MySQL bin path into the environment variable, as to whether MySQL automatically started (Launch the MySQL Server automatically check button), Can be set according to actual needs. If the system is only the current MySQL service, the service name directly using the default "MySQL" Can be, if the system already has other MySQL services, you can according to the actual situation of the service, change the name of the MySQL service.

17. Click the "Next" button to set the security options (Figure 18).

Figure 18

Set the root password and if the root user is required to remotely connect to the MySQL service on another machine, select the Enable root access from remote machines check button. For security reasons, it is not recommended to select the "Create an Anonymous account" check button, which in the past will result in unauthorized access to your database.

18. Click the "Next" button to enter the ready to execute interface (Figure 19)

Figure 19

19. Click the "Execute" button to perform the MySQL service configuration, and the system displays the information shown in Figure 20 if the execution is completed successfully.

Figure 20

20. Click "Finish" button to complete the installation and configuration of MySQL.

Note: There is a connection error warning at configuration, as shown in Figure 21.

Figure 21

There are two reasons for this. One is that the firewall blocks the MySQL port, and the second is the installation path on the MySQL path previously installed.

Solution: The first case, the establishment of firewall rules, so that the firewall allows access to MySQL connection port, the default is TCP 3306 port (usually, the firewall will be in the absence of rules to access the network when prompted and asked, the author after the first failure, Select Allow in firewall prompt, success on second retry. In the second case, delete or transfer the files and data subfolders in the installation directory. Or specify a different installation directory than the previous installation of MySQL.

In Windows, the default installation directory for MySQL 5.1 is C:/Program files/mysql/mysql Server 5.1. The installation directory includes the following subdirectories:

MySQL's configuration file under the MySQL installation root path, the filename is called "My.ini", in Windows using Notepad open, you can see inside the MySQL service configuration information, if necessary, you can manually modify the contents of this file to meet the actual needs.

Note: Close the Services tool when installing or uninstalling a server from the command line. This can prevent many errors.

If MySQL is not registered as a Windows system service when you install MySQL, you can refer to the MySQL official method for registering MySQL as a Windows service. If there are other issues with Windows installation, please refer to MySQL's official troubleshooting and troubleshooting of MySQL installation in Windows environment.

The above is the Windows MySQL installation configuration method, I hope to help you learn.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.