I was developing a new drupal 7 site on a local WAMP server.
Using phpMyAdmin, I tried to remove privileges to the site from an existing user and I guess succeeded in removing privileges from the 'root' user.
Now I can't get into phpMyAdmin anymore instead I get this:
"Error: #1045 - Access denied for user 'root'@'localhost' (using password:" YES)"

"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."

Comments

=-=

The question isn't drupal specific but: http://bit.ly/VDIy2s

Problem Solved

Thanks VM.
Below is a copy of the solution.

--->Alright folks, here is how I reset the MySQL on WampServer.

Download ResetMysql application from http://downloads.jlbn.net/. Then follow the below steps,

- Exit from the WampServer by clicking on “Exit” option in the system tray icon of WS.

- Go to C:\wamp\bin\mysql\mysql5.x.xx\data\mysql and copy three files mentioned below:

user.frm
user.myd
user.myi

- Now replace these 3 files with the files in the unzipped folder “ResetMysql” that you just downloaded

- In C:\wamp\apps\phpmyadminx.xx.x, find config.inc.php file and delete the password (if any) for root user. Root user password should be blank like this,

$cfg['Servers'][$i]['password'] =’’;

- In the same file, you need to find the below code and cross check whether ‘config’ is in single quote

$cfg['Servers'][$i]['auth_type'] = ‘config’;

- Now restart the WampServer, and access phpMyAdmin.

You will see all the databases created in the phpMyAdmin. Now you can also see the “Root” user with all the access privileges.

In case you are not able to see all the privileges to “root”, close the browser and start that again. Or you can try opening phpMyAdmin on different browser as well. This issue is related with some cookies if you already browsed (with problem of MySQL) the phpMyAdmin on same browser.

This is how you can reset MySQL and have your deleted user, access level etc. back on track for WampServer. <---

nobody click here