Tutorial on installing and changing the root password of MySQL 5.7.20 decompressed version

Tutorial on installing and changing the root password of MySQL 5.7.20 decompressed version

1. Download MySQL Archive (decompressed version)

URL: https://downloads.mysql.com/archives/community/

2. Unzip the file to the custom installation directory:

There is no "data" folder and "my.ini" configuration file after decompression

3. Configure environment variables after decompression

System variables: Create a new "MYSQL_HOME" value: xxx\mysql-5.7.20-winx64 (custom installation directory root path)

Append Path:;%MYSQL_HOME%\bin

4. Create a "my.ini" configuration file in the root directory of the custom installation path

Configuration information:

[client]
port = 3306
[mysqld]
port = 3306
basedir=%MYSQL_HOME%
datadir=%MYSQL_HOME%\data
max_connections=200
character-set-server=utf8
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
#Skip password skip-grant-tables

5. Initialize and install MySQL:

In the cmd terminal (it is recommended to run with administrator privileges)

>mysqld --initialize
>mysqld -install //Install the MySQL service. You can view the service in services.msc>net start/stop mysql //Open and close mysql

6. Set the root user password

>mysql -u root -p
enter password: Press Enter directly to enter mysql>update mysql.user set authentication_string=password('123') where user='root' and host='localhost';
mysql>flush privileges;

Exit mysql

Go to my.ini and comment out skip-grant-tables

After logging into MySQL, you will be prompted:

mysql error You must reset your password using ALTER USER statement before executing this statement.
mysql>SET PASSWORD=PASSWORD('123');
mysql>ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
mysql>flush privileges;

Just log in again.

Summarize

The above is the tutorial on how to install the decompressed version of MySQL 5.7.20 and change the root password. I hope it will be helpful to you. If you have any questions, please leave me a message and I 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 8.0.13 decompression version installation and configuration method graphic tutorial
  • Summary of installation steps and problems encountered in decompressing the mysql5.7.24 version
  • How to install and configure MySQL 8.0.12 decompressed version under Windows 10 with graphic tutorials
  • MySQL 8.0.12 winx64 decompression version installation graphic tutorial
  • mysql8.0.0 winx64.zip decompression version installation and configuration tutorial
  • Installation and uninstallation of MySQL 5.7 decompressed version and summary of common problems
  • Detailed steps for installing the decompressed version of MySQL 5.7.20 (two methods)
  • Python connects to the database MySQL decompressed version installation configuration and encountered problems

<<:  A brief discussion on the Linux kernel's support for floating-point operations

>>:  Detailed explanation of JS ES6 coding standards

Recommend

Steps to run ASP.NET Core in Docker container

There are too much knowledge to learn recently, a...

Win10 installation Linux system tutorial diagram

To install a virtual machine on a Windows system,...

Common repair methods for MySQL master-slave replication disconnection

Table of contents 01 Problem Description 02 Solut...

Writing Snake Game with Native JS

This article shares the specific code of writing ...

Can you do all the web page making test questions?

Web page design related questions, see if you can...

Thinking about grid design of web pages

<br />Original address: http://andymao.com/a...

Nginx memory pool source code analysis

Table of contents Memory Pool Overview 1. nginx d...

This article will show you how JavaScript garbage collection works

Table of contents 1. Overview 2. Memory Managemen...

Simple use of Vue vee-validate plug-in

Table of contents 1. Installation 2. Import 3. De...

How to use VirtualBox to build a local virtual machine environment on Mac

1. Big Data and Hadoop To study and learn about b...

Inspiring Design Examples of Glossy and Shiny Website Design

This collection showcases a number of outstanding ...

Some conclusions on developing mobile websites

The mobile version of the website should at least...

MySQL 5.7.23 installation and configuration graphic tutorial

This article records the detailed installation pr...