Search Google

Wednesday 10 December 2014

Access denied for user ‘root’@’localhost’ (using password: NO)

For wamp and xampp server Access denied for user ‘root’@’localhost’ (using password: NO)

or Access denied for user ‘root’@’localhost’ (using password: yes)



  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.

Now find $cfg['Servers'][$i]['AllowNoPassword'] = true; and replace it by $cfg['Servers'][$i]['AllowNoPassword'] = false;

i got the same error when i install xampp on my windwos7 system. solution i found is: in config.inc.php file i replaced the $cfg['Servers'][$i]['auth_type'] = 'config'; to $cfg['Servers'][$i]['auth_type'] = 'cookie'; then everything working fine... test your luck if have same issue..


or

1. xampp/htdocs/xampp/cds.php

change line 4 to: mysql_connect("localhost","root","enter password here");
change line 64 to: if(!mysql_connect("localhost","root","enter password here"))
-----------------------------------------------

I solved with following steps..

Step1: Go to Control Panel
Step2: Click Administrator Tools
Step3: Click Services
Step4: Find MySQL Service
Step5: Right click and click stop
Step6: Now Restart Wampserver

No comments:

Post a Comment