1

I'm getting this error: access denied for user 'root'@'localhost' using paswword (NO).

Its a fresh install of wampserver 2.2 32 bit.

Is there a way I can reset the mysql root password?

I have tried using mysqld.exe. --init-file=c:\reset.txt (below are the contents)

PDATE mysql.user SET Password=PASSWORD('') WHERE User='root';
FLUSH PRIVILEGES;

Unfortunately this does not work, windows command prompt just hangs.

Any help would be greatly appreciated.

Thanks

6
  • have you tried the password 'pass' ?
    – Jess Stone
    Feb 27, 2014 at 16:49
  • yes but won't work. to clarify i typed: mysql -u root -p (and then typed pass)
    – pzirkind
    Feb 27, 2014 at 16:49
  • mysql> UPDATE mysql.user SET Password=PASSWORD('Your new Password') WHERE User='root';
    – Jess Stone
    Feb 27, 2014 at 16:51
  • yes tried that too, problem is that the cmd just hangs (i press ctrl+c to break after 30 sec)
    – pzirkind
    Feb 27, 2014 at 16:53
  • just figured it out! windows doesn't like 'localhost' i need to type in 127.0.0.1 then it works
    – pzirkind
    Feb 27, 2014 at 16:55

1 Answer 1

1

It seems that windows is not reading the HOSTS file properly, as a result only 127.0.0.1 is accepted NOT localhost.

To work around this:

Go to your wamp\apps\phpmyadmin.versionnumber\

Open config.inc.php

Change the localhost to 127.0.0.1

Save and restart all services

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .