Download link: Baidu Netdisk
Extraction code: k1cd
Step 1: Download the above files, and then unzip them to other disks. The unzipped list is as follows:
Step 2: Configure environment variables
Step 3: Create a new TXT file and data folder
Step 4: Paste the following content into the txt file
[mysqld]
# 设置3306端口
port=3306
# 设置mysql的安装目录
basedir=D:\\software\\mysql 8\\mysql-8.0.15-winx64
# 切记此处一定要用双斜杠\\,单斜杠这里会出错
# 设置mysql数据库的数据的存放目录
datadir=D:\\software\\mysql 8\\mysql-8.0.15-winx64\\data
# 切记此处一定要用双斜杠\\,单斜杠这里会出错
# 允许最大连接数
max_connections=200
# 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统
max_connect_errors=10
# 服务端使用的字符集默认为UTF8
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
# 默认使用“mysql_native_password”插件认证
default_authentication_plugin=mysql_native_password
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8
Step 5: Rename the new file .txt to my.ini
Step 6: Use the cmd command to quickly enter the bin directory
Step 7: Enter in cmd
mysqld --initialize --console
Step 8: Run cmd as an administrator and then the following command
mysqld --install
Step 9: Report an existing error ( if you do not encounter this error, please skip to step 13 )
The service already exists!
The current server installed: "D:\software\mysql\bin\mysqld" --defaults-file="D:\software\mysql\my.ini" MySQL
Step 10: Input
sc query mysql
Eleventh step:
sc delete mysql
Step 12: Enter the following code
mysqld install
Step 13: Start mysql directly
net start mysql
The fourteenth step: modify the password, enter it in the new cmd
mysql -u root -p
Step 15: Enter the following command
alter user root@localhost identified by '你的密码';
The installation is now complete!