1. Stop the mysqld.exe process first 2. Open cmd and enter the bin directory of your mysql and enter this command: mysqld --skip-grant-tables After the input is completed, this cmd window cannot be used. Open another one as shown in the figure: 3. Also enter the bin directory of mysql and directly enter mysql and press Enter. Now the password verification is skipped and the database is linked as shown in the figure: 4. Check the user table in mysql to see our login username and password If you are interested, you can check it out yourself 5. Pay special attention here that there is no password field in the user table in versions above 5.7 The password field seems to have become authentication_string. You can change it by using this statement. update mysql.user set authentication_string=password('123456') where user='root' and Host = 'localhost'; 6. Final execution: flush privileges; That's it. The above is the MySql forgotten password modification method introduced by the editor, which is suitable for versions 5.7 and above. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Vue resets data to its initial state
>>: Linux lossless expansion method
Read uncommitted example operation process - Read...
Table of contents What are hooks? Class Component...
Table of contents Abstraction and reuse Serial Se...
MYSQL commonly used query commands: mysql> sel...
How to center the entire page content and how to m...
Anyone who has studied or used HTML should be fam...
In daily operation and maintenance work, nginx se...
Why should we read the log? For example, if the c...
Table of contents Boot Options Command Line Long ...
Display Definition ID When the auto-increment ID ...
Chapter 1 <br />The most important principl...
Table of contents question background Idea & ...
The Docker container provides services and listen...
#docker ps check, all ports are mapped CONTAINER ...
lead Some common triangles on web pages can be dr...