Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've just installed WAMP and tried to change root password. The cmd shows the below error. How to fix?

Command:

C:\wamp\bin\mysql\mysql5.5.24\bin>mysqladmin -uroot PASSWORD root

Error:

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
share|improve this question
    
Did you already have a password or was it blank when setting up? –  random Sep 8 '12 at 13:58
    
I think it's blank because I've just installed it –  Emerald214 Sep 8 '12 at 14:07
add comment

1 Answer

up vote 2 down vote accepted
C:\wamp\bin\mysql\mysql5.5.24\bin\mysqladmin -u root password NEWPASSWORD

Manual:

c:\wamp\bin\mysql\mysql5.5.24\bin>mysqladmin --help
  -u, --user=name     User for login if not current user.
  password [new-password] Change old password to new-password in current format

Another solution:

share|improve this answer
    
@Emerald214 is it work for you yes/no? Accept it or post comment it doesn't work.. –  Peter Sep 9 '12 at 18:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.