In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how win10 forgot the mysql password. I hope you will learn a lot after reading this article. Let's discuss it together.
Win10's solution to forgetting the mysql password: first shut down the MySQL Server service; then find the location where MySQL is installed; then open a command line window and enter the command [mysql-u root-p]; finally, modify the system database and update the password.
Win10's solution to forgetting the mysql password:
1. First, you need to shut down the MySQL Server service. In the "run" window, enter "services.msc" to enter the "Services" window.
2. In the service window, you can find "MySQL56", select it, and "stop" it.
In this way, the MySQL Server service stops.
It is important to note that the "MySQL56" here is subject to version restrictions. For example, if your MySQL version is 5.1, then this is "MySQL51".
Of course, you can also use "net stop MySQL56" in the command line window to stop the service.
3. Next, you need to use the installation location of MySQL. If you forget, you can find the installation "MySQL" folder in the "start" button (Windows key). Open and select the "MySQL Server 5.6" folder, and you will see two shortcuts that Mysql commond opens. Select one of them to view its properties, and you can find the location where MySQL is installed.
You can see that our MySQL location is "D:\ Program Files\ MySQL".
4. In fact, the reason why we want to know where MySQL is installed is to get the location of the .ini file under it. This file records the configuration information for MySQL. If we want to skip login permissions, we must get the location of the file.
It is important to note that different versions of the .ini file have different names, which is my.ini in MySQL 5.1 and my-default.ini in MySQL 5.6.
5. Next, open a command line window and enter the following command:
C:\ Users\ wang > mysqld-defaults-file= "D:\ Program Files\ MySQL\ MySQL Server 5.6\ my-default.ini"-console-skip-grant-tables
It is important to note that the window is no longer writable at this time. This is also a standard to verify that the command is executed correctly.
6. Open another command line window, enter the command: mysql-u root-p, and enter to enter the mysql command line interface.
7. Next, you just need to modify the system database and update the password.
The commands you need to use are:
Mysql- > show database;mysql- > use mysqlmysql- > update user set password=PASSWORD ('12345') where USER='root'
In this way, set the new password to 12345.
After reading this article, I believe you have a certain understanding of how to solve win10 forgetting mysql password, want to know more about it, welcome to follow the industry information channel, thank you for reading!
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
Check your database version yum list installed | grep mysql--Expected output:mys
© 2024 shulou.com SLNews company. All rights reserved.