In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the solution of forgetting password in mysql5.7 database, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
1. Stop the mysql service first
2. Edit the configuration file my.cnf
Add the skip-grant-tables configuration item to [mysqld]. The purpose of this configuration is to "adjust the restrictions of the permission table, do not use password authentication, and log in to the data directly", but do not forget to delete this item in the production environment.
3. Start the msyql service
If you log in to the database, you don't need a password and go directly to the database.
4. Change the password
Direct execution:
Update mysql.user set authentication_string=password ('123456') where user='root' and host='localhost';flush privileges
5. Delete the skip-grant-tables configuration item in my.cnf and restart the mysql service
6. You can log in to the database with the new password.
Thank you for reading this article carefully. I hope it is helpful for everyone to share the solution of forgetting password in mysql5.7 database. At the same time, I also hope you can support us, pay attention to the industry information channel, and find out if you have any problems. Detailed solutions are waiting for you to learn!
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.