# microsoft webmatrix deleted my wamp databases?

I've been using WAMP server for a while and I have several databases on the mysql server.

today I installed microsoft webmatrix and when I opened one of my sites on wamp I got a mysql error saying the connection has failed, and when I try to open the phpmyadmin it says access denied.

#1045 - Access denied for user 'root'@'localhost' (using password: NO)


I guess it somehow changed the password for my user, so how can I reconnect to wamp's phpmyadmin and restore my old databases?

Currently I can connect to the server with the password ' ' (space) but my databases are gone.

EDIT: ok I changed the password back to '' (null) using an sql command

SET PASSWORD FOR 'user'@'hostname' = PASSWORD('passwordhere');


is it possible to restore the old dbs?

-

## migrated from stackoverflow.comDec 6 '12 at 20:37

This question came from our site for professional and enthusiast programmers.

Here is the only thing I can advise for now:

Open a DOS Window and run the following

C:\> dir mysql.user /s


If you see two mysql.user files, then you may have two DB setups.

You would just have to point datadir in my.cnf back to the old setup.

Please find out and let me know ...

-
thank's I just manually restored it all –  Dotan Reis Dec 9 '12 at 10:34

If you didn't remove or modify the default accounts, you may be inadvertently connecting with one of those instead of the account you think you're connecting with.

Examples below are from a server that definitely has more databases than the two shown, but connecting using an unexpected username which matches one of the default account, which has an empty username and password.

\$ mysql --user=bogus --password='' # this is an empty string, not a space

mysql> show grants;
+--------------------------------------+
| Grants for @localhost                |
+--------------------------------------+
| GRANT USAGE ON *.* TO ''@'localhost' |
+--------------------------------------+
1 row in set (0.00 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| test               |
+--------------------+
2 rows in set (0.00 sec)

mysql>


If this is what you're seeing, then this could be what's happening. Your data may all be intact but you're not signing in as the user that you think you are -- because you're matching that anonymous account, which has very few permissions.

The SHOW GRANTS statement will tell you who you are really connected as.

-