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.
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.
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.
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:
entering download page
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.
Expand MySQL Server, click MySQL Server x64, click the green arrow, and add it to the list to be installed.
Expand the MySQL Server x64 on the right, and uncheck Development Components (if it cannot be expanded, it will not affect, just select all)
Click Execute to start the installation
After the installation is complete, Next enters the configuration
Next
Standalone, stand-alone mode (default)
keep all default
Set a password for the root user, next
If you don't need to start it, cancel the Start the MySQL... check, next.
Execute
Finish, the rest are Next
Next
Finish
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
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.
CMD client connection method:
mysql -uroot -p123456
bye or quit or close the window to exit the connection