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 mainly introduces how to solve the problem of mysql database forgetting login password, 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.
Nowadays, there are many places where we need to set a password, and there will always be times when we get confused or forget it. Let's talk about the main points of this article. For mysql root password forgetting, how should we retrieve it, or how to change the mysql database login password? Apache php mysql here I'm going to share with you a simple way to change your password:
1. First find and open the folder where mysql.exe and mysqld.exe are located (under the bin folder of the Mysql you installed), and copy the path address. As shown in the following figure
two。 Open the cmd command prompt and enter the folder where mysql.exe is located in the previous step. # (here I must run as an administrator) it is useless to open CMD directly)
3. Enter the command mysqld-- skip-grant-tables enter, and user authentication for mysql is skipped. Note that after entering this command, the command line is inoperable, and you can open a new command line at this time. Note: before entering this command, end the mysqld.exe process in the task manager and make sure that the mysql server side has finished running before doing so.
4. Then enter mysql directly, and you can log in to the database without any login parameters.
5. Enter show databases; to see all database instructions for successful login.
6. The mysql library is where the user name is saved. Enter use mysql; to select the mysql database.
7.show tables looks at all the tables and finds a user table that stores account information such as user name, password, permissions, and so on.
8. Enter select user,host,password from user; to view the account information.
9. Change the root password and enter update user set password=password ('root') where user='root' and host='localhost'; to change the password to root.
10. Check the account information again and select user,host,password from user; can see that the password has been changed.
11. Exit the command line, restart the mysql database, and try to log in with the new password.
Thank you for reading this article carefully. I hope it will be helpful for everyone to share how to solve the problem of forgetting login password in mysql database. At the same time, I also hope you can support us, pay attention to the industry information channel, and find out if you encounter 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.