MySQL provides 2 different versions for different users:

MySQL Community Server: Community Edition. MySQL open source community developers and enthusiasts to provide technical support for developers to open source code and provide free download. MySQL Enterprise Server: Enterprise Edition. It includes the most comprehensive advanced functions and management tools, but charges users. The MySQL installation described below in

is based on the free open source community edition. Open the MySQL database's download address , which provides two installation files, one is a direct installation of the MSI installation file, the other is a compressed package file that needs to be unzip and configured. What I use here is the installation of the 5.7.10 version.

installs

with MSI installation package and downloads the corresponding 32 bit or 64 bit installation package according to its own operating system. Follow the following steps:

first step: install license double click the installation file, and select "I accept the license terms" in the interface shown below, click on "I". Style= "text-align: center" >

  • Server only: only MySQL server is installed, which is suitable for deploying MySQL server.
  • Client only: install client only, which is suitable for MySQL application development based on existing MySQL server.
  • Full: install all available components of MySQL.
  • Custom: customize the components that need to be installed. The
  • MySQL will choose the "Developer Default" type by default, and the individual recommends a pure "Server only" type, reducing the dependency on the tools to learn and understand the MySQL database more deeply. You can choose the right type according to your needs. Click here on the "Server only" and click "next".

    is completed after the installation is completed until it enters the configuration page.

    fourth step: configures

    into the configuration page, as shown in the following figure:

    • Development Machine: development machine, MySQL takes up the smallest amount of memory.
    • Server Machine: a server machine, several server applications run on a machine, applicable to a database server as a web site or application, and will take up medium memory.
    • Dedicated Machine: dedicated machines, which are specially designed to run MySQL database servers, will occupy all available memory of the machine.

    chooses the corresponding type configuration according to its own use. I choose the "Server Machine" type for high concurrency performance test later.

    selects a good configuration type after the connection configuration, as follows:

    commonly used is the connection, check the option box, the default port number is 3306 It can be changed in the input box. If the database is only used on this machine, you can tick the Open Firewall port for network access to open the firewall. If you need remote calls, do not check it. The following "Named Pipe" and "Shared Memory" are interprocess communication mechanisms. "Show Advanced Options" is used to configure advanced options in subsequent steps, and to find out as much as possible about MySQL configurable items, check this box. Click "next" to get into the next step.

    fifth step: account configuration

    into the MySQL account and role configuration interface, as follows:

    Host indicates that it can be connected to the host address of the database, which can be set to local (localhost/127.0.0.1), an external IP (such as 218.17.224.228), an external network segment (such as 218.17.224.*) or all the hosts (%). ). Role represents the role of the account, and the roles that can be selected are as follows:

    occasions > with different privileges for different roles, temporarily not to be configured, follow up The details of the user rights management section.

    sixth step: configuring Windows Service to configure MySQL service to Windows service, the MySQL service will automatically start with the startup of the operating system and stop with the stop of the operating system, which is also the configuration recommended by the official document, with the following interface

    can be set as the default value, as long as it is not the same name as other services. In the Windows system, based on security requirements, MySQL services need to run under a given account and choose the default Standard System Account. Keep the default configuration and click "next".

    seventh step: advanced configuration

    because of the "Show Advanced Options" option in the previous fourth steps, so there is a high-level option configuration as shown in the following figure:

    here can configure the storage path of various log files, which are stored under the data directory of the MySQL installation directory by default, if not to be changed. Slow Query Log (slow query log) has a Seconds configuration item with a default value of 10, indicating that a SQL query records the query to Slow Query Log after 10s has not been queried and facilitates DBA to quickly find inefficient operations. Bin Log can be used for synchronization of master and slave data. The bottom Server Id is used for the Master-Slave configuration. These will be mentioned in the following course, where the default configuration can be maintained. Click "next".

    eighth step: server configuration application

    after the aforementioned configuration, a MySQL database has been basically configured. After getting into this step, click "Execute" to execute the configuration item, as follows:

    materialism ">" until the following interface shows the success of the installation, click " Complete.

    is installed with compressed packets and download the corresponding 32 - or 64 - bit packets according to their own operating system. Follow the following steps:

    first step: unzip

    to unzip the compressed package to the C:Program FilesMySQL path, and you can also customize the path. My path is C:Program FilesMySQLmysql-5.7.10-winx64, as follows:

    second steps: configure the environment variable

    right click "computer", select "properties", turn on in turn "Advanced system settings" -> "environment variable", select the "Path" item in the system variable, and click the edit, as follows:

    third step: modifies the configuration

    to open the my-default.ini file under the MySQL installation directory, find the basedir and dataDir properties, remove the preceding annotation notation, and modify the values as follows: basedir = C:Program FilesMySQLmysql-5.7.10-winx64. Nx64data represents the installation directory and data directory of MySQL, respectively. If you decompress it to other folders in the first step, modify the corresponding value. Rename the file to my.ini again. There is no my-default.ini file in the

    (MySQL5.7.18 version of the compressed version). You can create a new text file called my.ini. See MySQL official network: address 1;

     mysqld --initialize --user=mysql --console

    this command is used to initialize the data, which is not required to be executed in the previous version of 5.7. After initialization, it will provide a temporary root password, such as the red box below, and jot down the password.

    performs the following command MySQ.


    This concludes the body part