Mysql installation configuration and solving the problem of forgetting root password when reinstalling Mysql

Table of contents

1. Mysql installation and environment variable configuration

Forget the root password problem when reinstalling Mysql


1. Mysql installation and environment variable configuration

Official website installation: https://www.mysql.com/

Click as shown in the figure (the Windows version is used as an example here)

 Download the installation package

 Skip login and download directly

 Then double-click to open the installation package file

step1

insert image description here

step2

insert image description here 

If there is a prompt to install the required environment for MySQL, click Install, if not, continue to the next step

  

step3

 

step4

insert image description here 

step5

step6

 step7

strp8

 

step9

Set root account password

Note: Remember the root password! ! !

If you forget, please read the next half of the article

 step10

step11

  step12

step13

—— If the following content does not appear, it can be ignored——

step14

 step15

 step 16

 step17

 —— If the above content does not appear, it can be ignored——

 Then we need to configure the environment variables

 step1

 This PC -> Right click on "Properties"

step2

step3

 step4

 The third step is to browse the directory to find the Mysql installation path.

The default path is C:\Program Files\MySQL. The specific path on your computer shall prevail.

 step5

 In this way, Mysql has been installed and configured

Forget the root password problem when reinstalling Mysql

This is the easiest and most effective method that bloggers currently think. It can be said that it is enough to have hands

1. Open the MySQL Install Communit and delete the MySQL registry information

insert image description here

 2. Open the MySQL Install Communit and reinstall the MySQL database! ! !

insert image description here

insert image description here

insert image description here

insert image description here

 Then we go all the way to next

It will return to the following interface, and then you can reset the root account password of Mysql

 

Part of the source of the picture and the source of the reference article: MySQL database installation and solving the problem of entering the current root password_Yin Yinxi's Blog-CSDN Blog

 mysql5.7.30 installation_LiuGang_empty blog-CSDN blog

 MySQL 8.0 Installation Tutorial_zzkeung's Blog-CSDN Blog

Guess you like

Origin blog.csdn.net/weixin_51306597/article/details/121023590