First, install and configure MySQL for Windows
Note: If it is reinstallation, please perform the operation in this article to completely uninstall MySQL
1. MySQL
(1) Enter the address MySQL Community Downloads in the address bar of the browser , and press the <Enter> key to enter the download page of the official MySQL website
(2) Click MySQL Community Server to enter the page. Show download buttons for MySQL in different formats
(3) Here we click Archives to download other versions
(4) Choose version 5.7.37 here, and then choose according to the 32-bit/64-bit computer, click Download
PS: If the browser download is too slow, we can use Xunlei, the first step is to right-click Download and copy the link
The second step is to open Xunlei and create a new download task
At this time, the download speed will be much faster, remember to decompress after downloading
(5) The next step is to configure and initialize MySQL
First, create a new configuration file my.ini and a folder data in the directory you just downloaded
Open my.ini with Notepad , enter the following content (the path in the content must be your own path, remember to modify)
[mysqld]
# 设置3306端口
port=3306
# 设置mysql的安装目录 ----------是你的文件路径-------------
basedir=D:\mysql-5.7.37-winx64
# 设置mysql数据库的数据的存放目录 ---------是你的文件路径data文件夹自行创建
datadir=D:\mysql-5.7.37-winx64\data
# 允许最大连接数
max_connections=200
# 允许连接失败的次数。
max_connect_errors=10
# 服务端使用的字符集默认为utf8mb4
character-set-server=utf8mb4
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
# 默认使用“mysql_native_password”插件认证
#mysql_native_password
default_authentication_plugin=mysql_native_password
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8mb4
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8mb4
(6) Open the command line as an administrator, remember to run it as an administrator
(7) Enter the bin directory of the installation directory, first enter D: on the command line (because mine is on the D drive, the specific situation is inferred)
After entering, enter cd D:\mysql-5.7.37-winx64\bin (the specifics must be based on yourself)
Then to install, enter
mysqld --install
Note: Here you may encounter the problem that the dll file is missing or mysql.exe cannot start, if not, please ignore it
The reason for the problem is that the system dll dynamic link library or c++ dependent library is missing, which causes the installation to fail, so these libraries need to be repaired
Repair tool extraction code: n16n
Remember to run it as an administrator, then find the option in the tool, and check the smart recommendation and C++ powerful repair
Then repeat the above operation
Next check the automatically generated password
mysqld --initialize --console
Copy the password, it will be used later to change the password
(8) Start MySQL
net start mysql
(9) To log in to MySQL, enter the password for the initialization that you just remembered, and you cannot enter a single word wrong
mysql -u root -p
(10) Change password, (BY 'new password')
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
Enter exit to exit
(11) Environment variable configuration
Open environment variables
Variable name: MYSQL_HOME
variable value: your MySQL installation path
Then find the path , edit
new, enter
%MYSQL_HOME%\bin
This is what I have installed before
Next, you can see MYSQL running in the service
二. Navicat
(1) There is a Premium 15 installation package in the compressed package below, download it first, and remember to decompress it
Navicat download extraction code: vfmc
(2) Double-click the second installation package
Go to the next step, go here to install
Remember: please do not open the software after installation,
(3) Open another file below, please close the real-time protection of Windows in advance, and please close other protection software
The next step is to register and log in
Click Path to select the navicat.exe file in the navicat directory just installed
This window appears to indicate success, and other settings can be defaulted, and then click Generate (register) to generate a registration code , copy
Run Navicat, click register , do not click trial, enter the registration code just now in the software registration column
At this time, the server is temporarily unavailable window will appear, click manual
copy request code
Put it in the Request Code (request code) of the registration machine
Click Generate in the lower left corner
Copy the contents of Activation Code
Go back to Navicat and enter
Because this broken review system does not allow me to pass, so I will not post pictures of the process, please forgive me, please follow the steps yourself, and if you have any questions, please hit me in the comment area
(4) Open Navicat and create a new connection