[Solved] Wampserver : #1045 – Access denied for user ‘root’@'localhost’ (using password: NO)

...
resolved-wampserver-access-denied-error
Wampserver is a commonly used software by developers to do server side programs, especially for PHP web development. Wamp Server enables us to use your computer as a Local Host, it means you can use your computer as a host. If you have set a ROOT and PASSWORD for your MySQL Wampserver won't ask you for a password, instead it shows an error message like "#1045 – Access denied for user ‘root’@'localhost’ (using password: NO)"


Now we are going to diagnose the problem and finding an easy solution for the error.

Problem

When you try to access PHPMyAdmin ( http://127.0.0.1/phpmyadmin/ ) browser (Firefox recommended) denies your from accessing the Admin panel.

Solution

Here is a simple tip to solve Wampserver access denied for user root@localhost(using password: NO) error. If you carefully read each step you can certainly solve your problem.
  1. Open My Computer
  2. Go to C:\wamp (Note: This is Wampserver directory)
  3. Then go to  apps > phpmyadmin3.5.1
  4. Now find out file named config.inc.php and open it in a text editor (Eg: Notepad)
  5. Now find $cfg['Servers'][$i]['password'] = ”;and change it with $cfg['Servers'][$i]['password'] = ‘admin’; (Enter a password in the place of admin (Red Colored), this is only a test password).
  6. Now find $cfg['Servers'][$i]['AllowNoPassword'] = true;and replace it by $cfg['Servers'][$i]['AllowNoPassword'] = false;
  7. Done! Now save your changes (Press Ctrl + S or go to file and choose 'Save')
  8. Now you need to restart the Wampserver. To do this left click on the wamp icon in the system tray (The right bottom corner, where the time is being shown), now click on Restart all Services in the upcoming menu box.
restarting-wampserver-service
Screenshot: WampServer Restarting All Services

I believe this quick tip have resolved your problems. If you still face any problem on wamp you can really comment below. You can also share your result to inspire me as well the readers.

...

1 comment:

  1. Still getting same error #1045 - Access denied for user 'root'@'localhost' (using password: YES)

    ReplyDelete