Solution 1 Completely uninstall and delete all data. First, close all processes related to MySQL. Enter the command line (cmd) and enter Then find the root directory of MySql and delete it Solution 2 Enter the password in the command line or change the password .Run from the command line: The following operations are to operate some programs in the bin directory of MySQL. If the environment variables are not configured, you need to switch to the bin directory of MySQL and execute the following statements. Otherwise invalid .Continue to run in the command line: 3. Open a new command line and run: mysql -u root (If the mysql bin environment variable is not configured, you need to switch to the bin directory to execute this statement) If you don't want to change the password, but just want to see the original password. You can execute this statement on the command line select host,user,password from mysql.user; //You can view the user and password If you want to change the password, execute the following statement in the command line update mysql.user set password='Fill in the password you want to set here' where user='root'; After completing these operations, continue to run in the command line taskkill /f /im mysqld-nt.exe; //For safety reasons, end it first, because now you can log in directly with mysql -u root net start mysql; //Start the mysql service At this point, the solution to the forgotten mysql root password is complete. Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links You may also be interested in:
|
<<: How to install ELK in Docker and implement JSON format log analysis
>>: The implementation process of ECharts multi-chart linkage function
background Temporary tablespaces are used to mana...
Preface DISTINCT is actually very similar to the ...
BEM from QQtabBar First of all, what does BEM mea...
The first time I used the essay, I felt quite awkw...
To master: localStorage, component encapsulation ...
Preface: Basically, whether it is for our own use...
Table of contents origin Environmental Informatio...
Solution to the data asymmetry problem between My...
This article shares the installation and configur...
Summary of common functions of PostgreSQL regular...
This article mainly introduces how to implement l...
This article shares the specific code of js to im...
Achieve results Implementation Code html <div ...
Copy code The code is as follows: <!DOCTYPE ht...
Table of contents What happened? When to use Cont...