Mysql Recover Password

Source: Internet
Author: User

1. Find the location where MySQL is installed

Input cmd: Go to MySQL bin installation directory

such as: D:\Program files\mysql\mysql Server 5.5\bin>mysqld--skip-grant-tables

Execute the command as above: This cmd window is not moving yet.

2. Reopen a new command form

Enter CMD to go to the installation directory bin file to execute the MySQL command

Example: D:\Program files\mysql\mysql Server 5.5\bin>mysql

Enter the following command: To change the password:

mysql> use MySQL
Database changed
mysql> Update user set Password=password ("123") where user= "root";
Query OK, 1 row affected (0.05 sec)
Rows matched:1 changed:1 warnings:0

Refresh permissions:
mysql> flush Privileges;
Query OK, 0 rows affected (0.16 sec)

exit command form

Mysql> quit;

3. Re-enter MySQL

D:\Program files\mysql\mysql Server 5.5\bin>mysql-u root-p
Enter Password: * * *
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 2
Server version:5.5.28 MySQL Community Server (GPL)

4. Remark:

If there is an error, please end MySQL in the service, or net stop MYSQL5

Mysql Recover Password

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.