What to do if you forget mysql password in win10
The solution for forgetting mysql password in win10: first close the MySQL Server service; then find the installation location of MySQL; then open the command line window and enter the command [mysql -u root -p]; finally modify the system database and change Just update the password.
Related free learning: mysql database(Video )
Solutions for forgetting mysql password in win10:
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 will stop.
It should be noted that "MySQL56" here is limited by version. For example, if your MySQL version is 5.1, then it is "MySQL51" at this time.
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 on the "Start" button (Windows key), open and select the "MySQL Server 5.6" folder, and you will see two shortcuts to open MySQL commond. Select one of them to view its properties and you can find the installation location of MySQL.
You can see that our MySQL location is in "D:\Program Files\MySQL"
4. In fact, the reason why we want to know the installation of MySQL The location is to obtain the location of the .ini file under it. This file records MySQL configuration information. If we want to skip login permissions, we have to get the location of this file.
It should be noted that different versions of the .ini file have different names. In MySQL 5.1, it is my.ini, and in MySQL 5.6, it is my-default.ini.
5. Then, open the 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 should be noted that the window cannot be written to at this time. This is also a standard to verify whether the command is executed correctly.
#6. Open another command line window, enter the command: mysql -u root -p, and press Enter to enter the mysql command line interface.
#7. Next, you only need to modify the system database and update the password.
The command you need to use is:
mysql->show database; mysql->use mysql mysql->update user set password=PASSWORD('12345') where USER='root';
In this way, the new password is set to 12345.
The above is the detailed content of What to do if you forget mysql password in win10. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Three commonly used methods: 1. The most convenient method is to press the Windows key and R key at the same time; 2. Access "Run" through the shortcut menu or start menu; 3. By entering specific commands, users can quickly start the program, Open files or folders, configure system settings, and more.

Solutions to failed Windows 10 installation: 1. Check the hardware; 2. Update the driver; 3. Use reliable installation media; 4. Clean the existing system; 5. Check the system requirements; 6. Adjust BIOS/UEFI settings; 7. Clear Virus.

Obtaining a Windows 10 activation key is key to fully experiencing its capabilities. The legal way is to purchase a genuine key and then activate it through the "Activate" option in the system settings. Using illegal or pirated keys can pose security risks and is a violation of intellectual property rights. This article will guide you through legal means to obtain and activate a Windows 10 activation key, ensuring the security of your computer and supporting the work of software developers.

Windows 10 has high stability, traditional interface, smooth performance, and good security. Windows 11 introduces new features, optimizes performance, performs well in games, and enhances security. However, Windows 11, as a new system, may have compatibility issues and needs to be carefully evaluated before upgrading.

The most commonly used shortcut keys: 1. Frame selection screenshot: Win Shift S, you can select a rectangle, window or area of any format to take a screenshot, and the screenshot is automatically copied to the clipboard; 2. Full screen screenshot: Win Printscreen, save the entire screenshot to " "This PC - Pictures - Screenshots" folder; 3. Take a full-screen screenshot and edit it: Win W, bring up the screen sketch tool, which can crop, edit and save or copy the screenshot; 4. Take a full-screen screenshot to the clipboard: Print Screen.

Forgot to reset mysql password: 1. Open the command prompt. Search for "CMD" in the start menu and click to open; 2. Enter the MySQL installation directory; 3. Stop the MySQL service; 4. Run MySQL to skip authorization authentication; 5. Open a new command prompt window and enter the MySQL installation directory. bin folder; 6. Connect to the MySQL database; 7. Update the root user password; 8. Refresh permissions; 9. Exit MySQL; 10. Start the MySQL service.

Method: 1. Press "win+R" to open the "Run" window, enter the "msconfig" command, and click "Confirm"; 2. In the msconfig setting interface, click the "Startup" tab and click "Open Task Manager"; 3. In the Task Manager interface, click the "Startup" tab; 4. Find and select the unwanted startup item, right-click the mouse, and select "Disable" in the pop-up menu.

Solution for forgetting mysql password: 1. Use the mysqladmin command to reset the password; 2. Use mysqld_safe to reset the password; 3. Modify the MySQL configuration file.
