Solutions for forgetting the MySQL password-for Windows systems

Source: Internet
Author: User

C:\USERS\ADMINISTRATOR>CD C:\Program files\mysql\mysql Server 5.5\bin

C:\Program files\mysql\mysql Server 5.5\bin>net Stop MySQL

The MySQL service is stopping.

The MySQL service has stopped successfully.


C:\ProgramFiles\MySQL\MySQL Server 5.5\bin>mysqld--skip-grant-tables

You will see the window cursor flashing in the first position on the next line, which indicates that it has been started and does not require a tube.


Create a new command-line window and enter the E:\mysql5.5\bin directory to start MySQL

C:\Program files\mysql\mysql Server5.5\bin>mysql

Mysql> show databases;

+--------------------+

| Database |

+--------------------+

| Information_schema |

| MySQL |

| Performance_schema |

| Test |

+--------------------+

4 rows in Set (0.00 sec)

mysql> use mysql;

Database changed

mysql> Update user set Password=password (' Oracle ') where user= ' root ';

Query OK, 2 rows Affected (0.00 sec)

Rows matched:2 Changed:2 warnings:0

Mysql> flush Privileges;

Query OK, 0 rows affected (0.01 sec)

Mysql> quit

See if there is a Mysqld.exe process in the Task Manager, if so, kill .

C:\Program files\mysql\mysql Server 5.5\bin>net start MySQL

The MySQL service is starting.

The MySQL service has started successfully.

C:\Program Files\mysql\mysql Server 5.5\bin>mysql-uroot-poracle

Solutions for forgetting the MySQL password-for Windows systems

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.