MySQL5.7.21 decompressed version installation detailed tutorial diagram

MySQL5.7.21 decompressed version installation detailed tutorial diagram

Since I often install the system, I have to reinstall some software after each installation. When installing the software, I have to search for installation tutorials on the Internet, which is troublesome. So I compiled the installation method of the decompressed version of MySQL5.7.21 for your reference.

1. First, you need to download the unzipped version of MySQL. Download address: https://www.mysql.com/downloads/, diagram:

2. Unzip the installation package and choose the path according to your preference. I chose C:\software\, so the full path of MySQL is: C:\software\mysql-5.7.21-winx64

3. Configure environment variables

Add new system environment variables:

Key name: MYSQL_HOME

The value is: C:\software\mysql-5.7.21-winx64


Add %MYSQL_HOME%\bin in Path. Note that the ";" symbol between different values ​​in Path cannot be omitted.

4. Prepare the my.ini file. You can create a new my.txt file first, and then rename the file to .ini. The previous version may have a my-default.ini file after decompression, but the 5.7.21 version does not have it, so you need to create the file manually. The content of the file is as follows:

[mysqld]
port = 3306
basedir=C:/software/mysql-5.7.21-winx64
datadir=C:/software/mysql-5.7.21-winx64/data 
max_connections=200
character-set-server=utf8
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysql]
default-character-set=utf8

Note that the red box is the MySQL installation path, and use "/" instead of "\" between folders, otherwise errors may occur in the following operations.

After editing the my.ini file, put the my.ini file in the C:\software\mysql-5.7.21-winx64 directory

5. Open the cmd command window as an administrator and switch the directory to the bin directory of the MySQL installation directory


6. Execute the following statement to install MySQL

mysqld -install

After executing the command, the prompt: Service successfully installed. indicates that the installation is successful

7. Execute the following statement to initialize MySQL

mysqld --initialize-insecure --user=mysql

After executing the command, a data directory will be generated under the MySQL installation directory and a root user will be created.



8. Execute the following command to start the mysql service

net start mysql

After execution, the following prompt will appear:

MySQL service is starting..

The MySQL service has been started successfully.

9. After starting MySQL, the root user's password is blank. Set the password with the following command:

mysqladmin -u root -p password new password Enter password: old password

When you need to enter the old password, since the old password is empty, just press Enter.

Summarize

The above is the detailed installation tutorial of MySQL5.7.21 decompressed version introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • MySQL 5.7.21 decompression version installation and configuration method graphic tutorial
  • MySQL 5.7.21 decompression version installation Navicat database operation tool installation
  • Installation tutorial of mysql5.7.21 decompression version under win10
  • MySQL 5.7.21 decompression version installation and configuration method graphic tutorial (win10)

<<:  Detailed explanation of using Docker to build externally accessible MySQL

>>:  Detailed explanation of Angular structural directive modules and styles

Recommend

MySQL 5.7.21 Installer Installation Graphic Tutorial under Windows 10

Install MySQL and keep a note. I don’t know if it...

How to print highlighted code in nodejs console

Preface When the code runs and an error occurs, w...

Detailed explanation of the role of the new operator in Js

Preface Js is the most commonly used code manipul...

Mini Programs use Mini Program Cloud to implement WeChat payment functions

Table of contents 1. Open WeChat Pay 1.1 Affiliat...

Tutorial on installing mysql5.7.18 on windows10

This tutorial shares the installation and configu...

Detailed explanation of Javascript Echarts air quality map effect

We need to first combine the air quality data wit...

Several situations where div is covered by iframe and their solutions

Similar structures: Copy code The code is as foll...

MySQL Server IO 100% Analysis and Optimization Solution

Preface During the stress test, if the most direc...

How to solve the timeout during pip operation in Linux

How to solve the timeout problem when pip is used...

Solution to nginx not jumping to the upstream address

Preface Today I encountered a very strange proble...

CSS beginner tutorial: background image fills the entire screen

If you want the entire interface to have a backgr...