MySQL said: Documentation #1045 – Access denied for user ‘root’@’localhost’ (using password: NO)

I had this problem after changing the password for the root user in phpMyAdmin. I know nothing about programming but I solved it by doing the following:

  1. Go to file C:\wamp\apps\phpmyadmin3.2.0.1\config.inc.php (I guess you would replace “wamp” with the name of your server if you’re not using Wamp Server)

  2. Find the line $cfg['Servers'][$i]['password']='' and change this to

    $cfg['Servers'][$i]['password']='NO'
    
  3. Try opening phpMyAdmin again, and hopefully the message will now read “Access denied for user ‘root’@’localhost’ (using password: YES)

  4. Now change the password in the above line to ‘yourpassword‘ (whatever you had set it to before)

Hope this helps somebody.

Leave a Comment