• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 730
  • Last Modified:

How to change a forgotten MySQL ver. 5.5.8 root password (xampp Windows version)

I forgot the password.  I have tried:  
the following link, but was not successful.
and i have tried running the following:
C:\>C:\xampp\mysql\bin\mysqladmin.exe -u root -p secret
Enter password: ********
C:\xampp\mysql\bin\mysqladmin.exe: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
1 Solution
Lukasz ChmielewskiCommented:
Seems like you need to follow the C. section
"Create a text file containing the following statements. Replace the password with the password that you want to use.
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';

 Write the UPDATE and FLUSH statements each on a single line. The UPDATE statement resets the password for all root accounts, and the FLUSH statement tells the server to reload the grant tables into memory so that it notices the password change."

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now