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
Preface Use nginx for load balancing. As the fron...
a href="#"> After clicking the link, ...
It is a very common requirement to set the horizo...
When we write code, we often need to know the dif...
This article shares 3 methods to achieve the spec...
Create a new project test1 on Code Cloud Enter th...
Table of contents Preface Hello World image Set b...
Table of contents Preface Array.prototype.include...
Table of contents 1. Communication method between...
Preface In the MySQL database, sometimes we use j...
introduction As computing needs continue to grow,...
What is "Sticky Footer" The so-called &...
Generate a certificate chain Use the script to ge...
This article shares the specific code of jquery t...
This article uses an example to describe how to v...