Home Database Mysql Tutorial What to do if you forget mysql password in win10

What to do if you forget mysql password in win10

Oct 15, 2020 am 11:05 AM
mysql password windows10

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.

What to do if you forget mysql password in win10

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.

What to do if you forget mysql password in win10

#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.

What to do if you forget mysql password in win10

#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"

What to do if you forget mysql password in win10

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.

What to do if you forget mysql password in win10

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
Copy after login

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.

What to do if you forget mysql password in win10

#6. Open another command line window, enter the command: mysql -u root -p, and press Enter to enter the mysql command line interface.

What to do if you forget mysql password in win10

#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';
Copy after login

In this way, the new password is set to 12345.

What to do if you forget mysql password in win10

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Where to open windows 10 running Where to open windows 10 running Mar 19, 2024 pm 05:57 PM

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.

windows10 installation failed windows10 installation failed Mar 12, 2024 pm 05:09 PM

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.

windows10 activation key list latest 2024 windows10 activation key list latest 2024 Mar 19, 2024 pm 03:45 PM

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.

Which one is easier to use, windows10 or windows11? Which one is easier to use, windows10 or windows11? Mar 19, 2024 pm 04:11 PM

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.

Win10 screenshot shortcut key sharing Win10 screenshot shortcut key sharing Mar 19, 2024 pm 04:05 PM

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.

How to reset mysql password if I forget it How to reset mysql password if I forget it Jul 19, 2023 am 10:31 AM

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.

How to manage startup items in Windows 10 How to manage startup items in Windows 10 Feb 07, 2021 am 11:22 AM

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.

What should I do if I forget mysql password? What should I do if I forget mysql password? Jul 19, 2023 am 10:23 AM

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.

See all articles