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
With the popularity and maturity of Docker, it ha...
Section Course content Hours 1 Web Design Overvie...
Storage Engine What is a database storage engine?...
Table of contents 1. Concept Memory management mo...
This article shares the Java connection MySQL und...
Record the installation and configuration method ...
1. Why set maxPostSize? The tomcat container has ...
Common nmcli commands based on RHEL8/CentOS8 # Vi...
The isnull() function cannot be used as a substit...
Horizontal scrolling isn’t appropriate in all situ...
Assuming business: View the salary information of...
Through permission-based email marketing, not onl...
MySQL is a very powerful relational database. How...
XML is designed to describe, store, transmit and ...
Preface When we write web pages, we will definite...