0% found this document useful (0 votes)
6 views1 page

Mysql Recovery

The document provides a step-by-step guide to reset the MySQL root password. It includes instructions to stop the MySQL server, access the command prompt, and execute specific SQL commands to update the password. The process involves using the 'skip-grant-tables' option to allow access and then updating the password in the MySQL database.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Mysql Recovery

The document provides a step-by-step guide to reset the MySQL root password. It includes instructions to stop the MySQL server, access the command prompt, and execute specific SQL commands to update the password. The process involves using the 'skip-grant-tables' option to allow access and then updating the password in the MySQL database.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

UPDATE mysql.

user SET Password=PASSWORD('newpasswordhere') WHERE


User='root';
FLUSH PRIVILEGES;

Follow next steps:

1. Stop your MySQL server completely. This can be done from Wamp(if you
use it), or start “services.msc” using Run window, and stop the service
there.

2. Open your MS-DOS command prompt using “cmd” inside the Run window.
Then go to your MySQL bin folder, such as C:\MySQL\bin. Path is different
if you use Wamp.
cd C:\Program Files\MySQL\MySQL Server 5.0\bin
3. Execute the following command in the command prompt:

mysqld-nt.exe -u root --skip-grant-tables

allow access.

4. Leave the current MS-DOS command prompt as it is, and open a new MS-
DOS command prompt window.

5. Go to your MySQL bin folder again.

6. Enter “mysql” and press enter.

7. You should now have the MySQL command prompt working. Type “use
mysql;” so that we switch to the “mysql” database.

8. Execute the following command to update the password:

UPDATE user SET Password = PASSWORD('12345') WHERE User = 'root';

However, you can now run almost any SQL command that you wish.

After you are finished close the first command prompt, and type “exit;”
in the second command prompt.

You might also like