In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how mysql resets passwords. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
Remember the password and prepare to change the new password
Connect to the mysql database and enter instructions in cmd:
Mysql-uroot-p
Then enter the password by pressing enter.
two。 Switch the database:
Use mysql
* mysql is the default database of the system, which contains a user table that stores the user name and password of the current database user. *
3. Modify the password of user table in mysql database
Update user set password=password ('root') where user='root'
* password ('root') is a function, and root is the modified new password, which is passed as an argument to the password () function *
4. Restart the service for mysql.
Forget your password and prepare to reset it
Stop the mysql service and execute the instructions in the cmd window:
Compmgmt.msc
Open Compute Management-> Services and applications-- > Services-> mysql, and stop the service.
two。 Open the cmd window and execute the command inside the window:
Mysqld-- skip-grant-tables / / (don't add semicolons after it)
This instruction is to skip the security check.
After this instruction is executed, we will see the cursor flashing, indicating that a service is turned on, similar to the tomcat server.
3. Keep the current cmd window open, open another cmd window, connect to the mysql database mysql-u root, switch the database use mysql; to modify the user table password in the mysql database; for more information, please refer to the operation of "remember password and prepare to change new password" above.
4. Close the two cmd windows, and Ctrl+Shift+Esc opens the task manager to find mysqld's process and kill it.
5. Start the mysql service:
Open Compute Management-> Services and applications-- > Services-> mysql, and start the service.
Thank you for reading! On how to reset the password mysql to share here, I hope that the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.