MySQL installation (the most complete and detailed tutorial on the whole network)

Table of contents

1 MySQL uninstall

1.1 Stop the MySQL service

1.2 Uninstalling the software

2 MySQL download, installation and configuration

2.1 4 major versions of MySQL 

2.2 Software download

2.3 Software installation

​2.4 Software configuration

3 Simultaneous installation of multiple versions of mysql

4 Problems that may occur during installation 


1 MySQL uninstall

    Some people want to uninstall the old version of MySQL and install the new version of MySQL, so before talking about how to install it, let me introduce how to uninstall MySQL in detail, taking MySQL8.0 as an example.

1.1 Stop the MySQL service

    Before uninstalling, stop the service of MySQL8.0. Press the "Ctrl+Alt+Delete" key combination on the keyboard to open the "Task Manager" dialog box, and you can find the "MySQL8.0" service in the "Services" list. Service, select the "Stop" option to stop the service of MySQL8.0, as shown in the figure.

1.2 Uninstalling the software

   Method 1: Through the control panel method 

To uninstall the MySQL8.0 program, you can directly select "Uninstall a Program" in the "Control Panel" like other desktop applications, and find the MySQL8.0 server program in the program list, and double-click to uninstall it, as shown in the figure. This way of uninstalling, the data in the data directory will not be deleted.

    Method 2: Uninstall through software such as 360 or computer manager 

slightly.

   Method 3: Uninstall through the uninstall function provided by the installation package

You can also uninstall the MySQL8.0 server program through the installation wizard.

①Double-click the downloaded mysql-installer-community-8.0.26.0.msi file again to open the installation wizard. The installation wizard will automatically detect the installed MySQL server program.

②Select the MySQL server program to be uninstalled, and click "Remove" to uninstall.

2 MySQL download, installation and configuration

2.1 4 major versions of MySQL 

    ①MySQL Community Server community version, open source and free, but does not provide official technical support, suitable for most ordinary users.

    ②MySQL Enterprise Edition requires payment and cannot be downloaded online. You can try it for 30 days. It provides more functions and more complete technical support, and is more suitable for enterprise customers with higher requirements on the function and reliability of the team database.

    ③MySQL Cluster cluster version, open source and free, is used to set up cluster servers, and several MySQL Servers can be packaged into one Server. It needs to be used on the basis of Community Edition or Enterprise Edition.

    ④MySQL Cluster CGE Advanced Cluster Edition requires payment.

    This installation selects version 8.0.26.

2.2 Software download

    download link:

Official website: http://www.mysql.com

Select at the bottom of the official website:

 

After entering, select:

 

After entering, click (because the historical versions are all inside): 

 

After clicking in and selecting version 8.0.26, the following appears:

Just click Download.

2.3 Software installation

After downloading, click:

After a while this interface appears:

Then the following interface appears, select custom custom installation method:

Next, click the plus sign to expand, select what we need, and click the right arrow to put it in the right frame:

Click MySQL Server 8.0.26 - X86, a hyperlink Advanced Options will appear below, click and select the path to be installed:

Once done, click next:

Finally click Excute to execute:

2.4 Software configuration

After the installation is complete, start the software configuration:

Just click next, the default port number is:

Encryption can be selected by default, click next:

Enter the password you specify, and enter it again, click next:

Then click next:

Click next:

After successful configuration, click Finish, and then select next for all.

Finally, you can see that the installation was successful in the folder you selected the path before:

After the environment is configured, add the path of the bin folder to the path of the environment variable (if you don’t know how to do this, you can search to add the environment variable):

 

Enter mysql --version on the command line to view:

The next step is to execute mysql -uroot -p+ the previously set password (+ no need to enter) to log in successfully:

So far, you can use the mysql server for development.

3 Simultaneous installation of multiple versions of mysql

But in order to meet the needs of other people who need to install multiple versions of mysql server, I will introduce how to install multiple different versions of mysql on the computer. 

Note that most of the steps to install multiple versions of mysql are the same, but the port number needs to be modified, because a port number is only used by one version.

You can change a port number and specify it at will:

 

If you want to switch to use, you can enter the command on the command line to switch the port, and you can switch to the new version by entering the port number 13306.  

 

4 Problems that may occur during installation 

    For the problems that may occur during the installation process, since the blogger himself did not encounter any relevant problems during the test installation process, he recommends a problem-solving video by Mr. Song Hongkang. If you encounter corresponding problems You can go and see the solution.

The video is at station b, from getting started with MySQL database in Shang Silicon Valley to Daniel, the 8th video.

 

 

Guess you like

Origin blog.csdn.net/Starinfo/article/details/131828321