MySQL 5.7.21 decompression version installation and configuration method graphic tutorial

MySQL 5.7.21 decompression version installation and configuration method graphic tutorial

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, 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 in Path: %MYSQL_HOME%\bin. 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.

The decompressed version of MySQL 5.7.21 has been installed.

Wonderful topic sharing: Installation tutorials for different versions of MySQL Installation tutorials for various versions of MySQL 5.7

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • MySQL 5.7.27 installation and configuration method graphic tutorial
  • Win32 MySQL 5.7.27 installation and configuration method graphic tutorial
  • MySQL 5.7.27 installation and configuration method graphic tutorial
  • MySQL5.7.27-winx64 version win10 download and installation tutorial diagram
  • Detailed steps to install MySql 5.7.21 in Linux
  • Detailed tutorial for installing mysql5.7.21 under Windows system
  • MySQL 5.7.20 Green Edition Installation Detailed Graphic Tutorial
  • MySQL 5.7.20 installation and configuration method graphic tutorial under Windows
  • MySQL server 5.7.20 installation and configuration method graphic tutorial
  • MySQL 5.7.27 winx64 installation and configuration method graphic tutorial

<<:  JavaScript example code to determine whether a file exists

>>:  Install CentOS system based on WindowsX Hyper-V

Recommend

Vue realizes adding watermark to uploaded pictures (upgraded version)

The vue project implements an upgraded version of...

How to use lodop print control in Vue to achieve browser compatible printing

Preface This control will have a watermark at the...

How to start a Vue.js project

Table of contents 1. Node.js and Vue 2. Run the f...

How to set default value for datetime type in MySQL

I encountered a problem when modifying the defaul...

Analysis of three parameters of MySQL replication problem

Table of contents 01 sql_slave_skip_counter param...

Simple steps to configure Nginx reverse proxy with SSL

Preface A reverse proxy is a server that receives...

Solution to Docker image downloading too slowly

Docker image download is stuck or too slow I sear...

Native js to achieve star twinkling effect

This article example shares the specific code of ...

MySQL 8.0.16 installation and configuration graphic tutorial under macOS

This article shares the installation and configur...

MySQL replication mechanism principle explanation

Background Replication is a complete copy of data...

Linux echo text processing command usage and examples

The description of echo in the Linux help documen...

WeChat Mini Programs Achieve Seamless Scrolling

This article example shares the specific code for...

Detailed examples of Docker-compose networks

Today I experimented with the network settings un...

A brief talk about React Router's history

If you want to understand React Router, you shoul...

Vue3.0 uses the vue-grid-layout plug-in to implement drag layout

Table of contents 1. Plugins 2. Interlude 3. Impl...