MySQL login forgot password, modify (WINDOWS10)

Source: Internet
Author: User
Tags mysql login

My MySQL is someone else's outfit, long time useless, cause no one can remember the password

1. To turn off MySQL server for convenience, open cmd with administrator

2. Switch the directory from the default C-drive location to the Mysqld.exe installation directory (for example, my directory: D:\Program files\mysql\mysql Server 5.7\bin)

Then enter the following command in the DOS command

First, if the MySQL service starts, close it, and then change the disk.

3. Skip Password Verification

Execution here will only have the cursor in a flash flash can not continue to write commands, so re-open a CMD window

4. Write down the following command

After the red Number 3 step, the prefix for each line of the command changes to mysql> and no secret login is correct. However, after executing to 4, the password will be changed, and the password field written on the web does not exist in the user table, so look at the structure of the table (without the number box)

5. It is known that after mysql5.7, the password field has been changed to authentication_string

This is the 45 fields shown in the user table, where the password field is selected

Change Password:

Prompt for modification success.

Live: Problems that may be encountered during the period, such as the loss of mysqld-nt .... Command error is not internal or external command, to check the system environment variables (path when the MySQL installed bin path, as follows my), path

Also: When the MySQL server is turned on, it may say that the service is shut down after startup, and some services or programs stop automatically when they are not in use ....

Delete the service directly: DOS command switch in the MySQL installed bin directory, write on: Mysqld.exe service delete mysql (MySQL write your own service name)

Re-registration service: Mysqld.exe-install

Open Service try: net start MySQL.

MySQL login forgot password, modify (WINDOWS10)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.