Steps to install MySQL in Windows environment

foreword

Note: If there is already a MySQL database on the computer, there is no need to install it, whether it is Windows, Linux or Docker, whether it is 5.7 or 8.0.
If the MySQL database that comes with phpstudy can be started, it can also be used, otherwise you have to install it yourself.

Due to the different environments, various problems may be encountered during the installation process. Don’t panic, search according to the error prompt first, and try more.
Before installation, please take a look carefully, there are several problems you may encounter:
1. The certificate chain problem usually occurs in the win7 operating system, which may be caused by the old version of the operating system. It is recommended to use a virtual machine or docker to install.

insert image description here

2. The .NET framework dependency problem can usually be solved by automatic download and installation. Otherwise, you can use tools such as XX software manager to download and install. If it still doesn't work, consider other installation methods.
insert image description here

3. After the installation is complete, the mysql command does not exist.
This is caused by the MySQL environment variable not being configured properly. Search how to solve it yourself.
insert image description here

1. Download the installation package

Download address: https://dev.mysql.com/downloads/mysql/
The home page is the latest version 8.0.
It is recommended to install the 5.x version, you need to click the link on the right:

insert image description here
entering download page

insert image description here

The actual download address is:
https://downloads.mysql.com/archives/get/p/25/file/mysql-installer-community-5.7.31.0.msi
If the web page is slow to download, you can copy it to Thunder for download

2. Installation

After the download is complete, go to your download directory and click the .msi file to enter the installation

Select Custom custom installation
Note: If there is no Next button during the installation process, it is a problem of system resolution scaling. Pressing the N key will fix this.

insert image description here

Expand MySQL Server, click MySQL Server x64, click the green arrow, and add it to the list to be installed.

insert image description here

Expand the MySQL Server x64 on the right, and uncheck Development Components (if it cannot be expanded, it will not affect, just select all)

insert image description here

Click Execute to start the installation

insert image description here

After the installation is complete, Next enters the configuration

insert image description here

Next

insert image description here

Standalone, stand-alone mode (default)

insert image description here

keep all default

insert image description here

Set a password for the root user, next

insert image description here

If you don't need to start it, cancel the Start the MySQL... check, next.

insert image description here

Execute

insert image description here

Finish, the rest are Next

insert image description here

Next

insert image description here

Finish
insert image description here

The configuration file of MySQL Server in the Windows environment is my.ini, which is generally in the MySQL installation directory.
For example: C:\ProgramData\MySQL\MySQL Server 5.7

3. Tool connection

There is a Navicat compressed package in the network disk.
Install navicat112_premium_cs_x64.exe first, and it will not start after installation.
Then run PatchNavicat.exe to crack.
[ If Navicat crashes, it is a version problem, find another version by yourself ]

Right click on the blank space on the left - New Connection - MySQL
insert image description here

Connection name: It is used to distinguish, take it casually, such as aliyun131, docker168
Host name: This machine is localhost, no need to change, remote IP
port: If it is not changed, it is 3306
After configuration, you can click the connection test first, If the connection is successful, OK and save. In the future, just double-click to open the connection.
insert image description here

CMD client connection method:
mysql -uroot -p123456
insert image description here

bye or quit or close the window to exit the connection

Guess you like

Origin blog.csdn.net/m0_52051132/article/details/127337304
Recommended