I finished learning SQL by myself not long ago, and downloaded MySQL 8.0.17. After installing and configuring it, I explored it and wondered if I could delete the root account by logging in with the root account. Then I wanted to slap myself... How to quickly restore root: 1. Close the MySQL service: press win+R, type services.msc, find the MySQL service, and click stop; 2. Delete the data folder and its files: Enter the mysql folder, find the data folder and delete it; 3. Initialize mysql: Enter services.msc again and run the mysql service; enter the mysql\bin file path in the cmd window and run mysqld --initialize --console. The result is similar to the following:
Note that the bold statement contains the temporarily generated root account password; 4. Run mysql in cmd: type 5. Modify the temporary root password: Run the SQL statement: alter 6. Check whether the query is successful: Run the SQL statement: Note: Although this method is quick and effective, it will delete all database files, that is, the databases in the data folder. I have tried adding skip-grant-tables to bypass login authentication, but it is not effective for version 8.0.17. Summarize The above is what I introduced to you on how to recover the deleted Mysql8.0.17 Root account and password under Windows. I hope it will be helpful to you! You may also be interested in:
|
<<: JavaScript to achieve calendar effect
>>: Detailed steps for installing, configuring and uninstalling QT5 in Ubuntu 14.04
Introduction Incremental backup means that after ...
Table of contents Preface Add sudo write permissi...
This article example shares the specific code of ...
MySql batch insert optimization Sql execution eff...
Table of contents 1. let keyword 1.1 Basic Usage ...
Occasionally you'll see characters such as ...
Create an HTML page with an unordered list of at l...
The following case reviews the knowledge points o...
1. Installation Instructions Compared with local ...
Timer Effects: <div> <font id='timeC...
ENV: [root@centos7 ~]# uname -r 3.10.0-514.el7.x8...
Why use prettier? In large companies, front-end d...
Summary This article will introduce the following...
1. Unzip MySQL 5.7 2. Create a new configuration ...
1. Uninstall the JDK that comes with centeros fir...