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
Preface ActiveMQ is the most popular and powerful...
When designing table structures, numeric types ar...
Uninstall the system-provided MySQL 1. Check whet...
Table of contents 1. Filter unique values 2. Shor...
This article records the detailed process of down...
Click here to return to the 123WORDPRESS.COM HTML ...
HTML tags have special tags to handle the title of...
1. Vue--The first vue-cli program The development...
VirtualBox is a free and open source virtualizati...
To do a paginated query: 1. For MySQL, it is not ...
This article uses examples to illustrate the opti...
Let our users choose whether to move forward or ba...
The front-end development department is growing, ...
Tips for viewing History records and adding times...
Preface During the development process, you will ...