This is one of the most common problems found with WAMPSERVER. I ran through this problem too and posted my solution under the same title here . But after getting no appropriate reply/solution I had to dump Wampserver and install XAMPP instead . It works smoothly (For solution to the problem Scroll down and look under UPDATE section or you can read what my problem was exactly before you run into a quicky )
Here are the details :
Okay ,I am using WAMP and changed mysql password from phpMyAdmin interface of all the root accounts.
Now after that i when i tried to access localhost/phpmyadmin - The access was denied and the interface is not ready to show up .
Here is the Error
#2000 - mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
Then afterwards i tried using the method given in Reference manual for resetting the password by creating that init.txt file (Hope you all know what i am reffering to here . If not just try this link)
Then following all the instructions clearly the CMD in its output shows some following negative statements:
Invalid password found for "Edited_root_username" @localhost
Note: the rootusername that CMD shows is the one that i changed through phpMyAdmin interface. the previous one was of course - root.
And some other catching statement in cmd was:
please check yor mysql manual for correct syntax near `FLUSH PRIVELEGES.
Can't figure out where the problem is ???
[Update]
Okay , the problem will not be solved until you reintsall the WAMPSERVER . But if you want to change your ROOT password for the new installation by following the instructions given in the mysql manual , Please don't bother .It is a total waste of time . After following the procedure in mysql manual there are same errors in command prompt as i mentioned above . Yes , this time you do have access to PHPMYADMIN (due to reinstallation) but as soon you execute the mysql init.txt file , PHPMYADMIN says you have no database privileges (seems WAMP is not ready to give up--anyways screw this and have a look at solution below)
Solution:
Back up the data you have under mysql->data folder and Instead of reinstalling Wamp install XAMPP .
The procedure laid down in XAMPP password change help page for changing root password really works like a charm (check the FaQ link for quick access ->to this question).
And yes place the earlier data you copied from mysql->data folder in WAMP in the same folder DATA folder under mysql in your new XAMPP Installation .
IT WORKED FOR ME and I am having access to almost all databases i created earlier in wamp
NOTE---Some of the tables might not show up if their .FRM files are not having corresponding.MYDand.MYIextension files .But important ones did showed up for me :).
解决方案
Open a MySQL console (taskbar > wamp > MySQL > MySQL console )
type: SET PASSWORD = PASSWORD('your_current_password')