Guys,
I am not able to reset MySQL root password,
mysqld_safe --skip-grant-tables & this command is not working.. please suggest
thanks
tanweer
Sharley's KB wrote:Make sure that MySQL is stopped and the MySQL service is uninstalled if you have the service installed
We will need to open 2 Command Console Windows in the xampp\mysql\bin directory and run some commands.
Just in case you are not familiar with how to do that please try and follow these instructions.
Open the first Console Window:
Click on start bottom left of the Windows Task Bar
Click on Run...
Type cmd.exe
Click OK
type cd C:\xampp\mysql\bin (change to your own path)
Press Enter
At the prompt bin> type mysqld --skip-grant-tables
The cursor should now be just flashing on a blank line waiting.
Leave that Console Window open and go to open the second Console Window.
Next, open the second Console Window:
Click on start on the Task Bar again
Click on Run...
Type cmd.exe
Click OK
type cd C:\xampp\mysql\bin (change to your own path)
Press Enter
At the prompt bin> type mysql -u root
Press Enter
At the prompt mysql>type all this UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
Press Enter
At the prompt mysql>type FLUSH PRIVILEGES;
Press Enter
At the prompt mysql>type exit
Press Enter
You should be back at the bin>prompt and job done.
Now just close both Console Windows.
Your MySQL and phpMyAdmin will have user root with password password as set by this part of the above command:
UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
If you want to change from password to a new one of your choice, just change password in between the single quotes to the new one of your choice for example:
UPDATE mysql.user SET Password=PASSWORD('mynewpass') WHERE User='root';
Now open the XAMPP Control Panel and you should see that MySQL is already started - just start Apache now, and to test that the password has indeed changed go to:
http://localhost/phpmyadmin
Enter Username: root and Password: password (or your new password of choice)
click Go
Users browsing this forum: No registered users and 195 guests