Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've somehow managed to completely lock myself out of MySQL on WAMP. It seems all privileges are denied for all users. The only way I can get into MySQL is via the command prompt but without entering a user. From there, I quite literally cannot do anything... all privileges are denied. I've tried updating the root password to no avail.

I've also tried completely uninstalling WAMP as well as MySQL. After uninstalling MySQL, I deleted the data directories inside them to get rid of all the info there. After re-installing WAMP, the problem persists.

Attempts to access PHPMyAdmin results in:

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

Can anyone help??

share|improve this question

Give this a try in an elevated command prompt:

1: net stop mysql

2: mysqld_safe --skip-grant-tables &

3: mysql -u root

Output will look like this:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.5.13

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


4: Here you will reset your root password:

mysql> USE mysql;
mysql> quit

5: mysqladmin shutdown

6: Now you can start MySQL and test it:

net start mysql
mysql -u root -p
share|improve this answer
Where do I type these commands in? (I'm on windows) – tnw Jun 16 '11 at 21:30
are you sure these commands are for windows? Both the commands you listed in #1 and #2 give me "service name is invalid" and "not recognized as an internal or external command", respectively. – tnw Jun 17 '11 at 13:56
@Tory- Yes, this is for Windows. You can find out more info about running MySQL as a service here – chrsblck Jun 17 '11 at 16:28

You must log in to answer this question.

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