Installation and uninstallation of MySQL 8.0 and 5.7 under windows

Version 5.7 is a very major version, and version 8.0 is a very major update. In fact, version 8.0 is version 5.8, but the minor version number is used instead of the major version number.

An operating system can run multiple mysql software at the same time, so it is no problem to install two versions of mysql at the same time.

The installation of 8.0 and 5.7 is similar, but the subsequent installation steps are different, because the mysql installer knows that you have installed a database, there will be a button to add a database, and the subsequent database installation steps will be relatively less.

Installation of MySQL 8.0

Install 8.0 first.

1. Open the download page

https://www.mysql.com/downloads/
Click MySQL Community (GPL) Downloads at the bottom, all of the above are paid versions.
insert image description here

2. Click MySQL Community Server.

insert image description here

3. Click the Go to Download Page button

Do not click the zip format compressed package below. This method requires additional configuration and is troublesome. Downloading is not recommended.
insert image description here

4. Download the offline installation package

There are two installers, one is offline and the other is online, offline is recommended. Of course you can choose the version, click Archives next to it.
insert image description here
I chose the version 8.0.26.
insert image description here

5. Start the installation

Choose Custom.

insert image description here
There will be many options, we just need to select MySQL Server 8.0.26-X64 and click the right arrow to move to the right part. Then select the MySQL Server 8.0.26-X64 on the right and an Advanced Options option will appear at the bottom right. Click this option to configure the installation location and data location of the database software.
insert image description here
The location can be modified.
insert image description here
Next, I will check the required environment and tell me that I need MV C++ 2019. If you have already installed it, there will be no such prompt. If you don’t directly click Execute, it will be downloaded automatically, and then you can install it directly. It is very simple.
insert image description here
If successful, the following interface will appear, click Execute to actually start installing the MySQL ontology.
insert image description here
If there is no problem, you will enter the next step of configuration.
insert image description here
Here you can directly go to the next step. There are three options for Config Type. Just learn to choose the first one, which takes up less memory. The second option means that there are multiple databases at the same time. MySQL is only one of them, and the memory usage is medium. The third option means MySQL Alone, will take up as much memory as possible.
insert image description here
insert image description here
Password type, choose the first one.
insert image description here
Set a password, nothing to say. You can add users below, but don't add them now.
insert image description here
Configure the Windows service, the service name can be modified here, and the service can be seen in the Windows management interface.
insert image description here
Click Execute to execute the configuration.
insert image description here
The following interface appears, indicating that the installation is successful.
insert image description here

6. Environment variables

Finally, you need to set the environment variable.
insert image description here

insert image description here
Open a new cmd window and enter mysql --version. If the following content appears, the installation is successful.
insert image description here
Log in with the root account, enter the password and the following content appears, indicating that the login is successful.
insert image description here

MySQL5.7 installation

Download the installer of MySQL5.7, the steps are the same as those of 8.0.
insert image description here
Click the downloaded installer, and the following interface will appear, Welcome Back! Very strange, why does it display Welcome Back? Because the installer already knows that you have another version installed.
insert image description here
The next step is to ask if you want to update? Here we remove the tick and click cancel.
insert image description here
The following interface will appear.
insert image description here
Click add and a familiar interface will appear. Select MySQL Sever 5.7.38-X64 and add it to the right. Select MySQL Sever 5.7.38-X64 on the right, and an Advanced Options will appear.
insert image description here
insert image description here
It prompts that MV C++ 2013 is required, just click Execute and let him download it by himself. Then install it manually, it's very simple.
insert image description here
When ready, click Execute.
insert image description here
It's time for configuration.
insert image description here
The port needs to be changed, here it is changed to 13306, and the port range is 0 to 65535.
insert image description here
Set the password.
insert image description here
The default will do.
insert image description here
Click Execute.
insert image description here
Finally, this interface appears. Indicates that both versions are installed.
insert image description here

version switching

To switch between the two versions, you can use the following command to switch, in fact, specify the port number, and mysql will automatically switch for us. It is not recommended to use environment variables to switch, because only one environment variable can take effect, and the previous one will take effect .
insert image description here

Guess you like

Origin blog.csdn.net/ScottePerk/article/details/126312720