#1045 - Access denied for user 'root'@'localhost'

When I try to open phpmyadmin in browser I get this 

#1045 - access denied for user 'root'@'localhost' (using password: Yes)


wampserver 2.4 and 2.5 

start your wampserver and click notification bar wamp icon
click on mysql and click Mysql console to open it.
if you open it first time then enter without password, if you already make a password then fill your password and open console and use these instructions:

Wampserver mysql console

  1. use mysql;
  2. SET password for 'root'@'localhost'=PASSWORD('mypassword');
  3. quit
click on notification icon of wampserver and 'Restart All Services'
after icon goes green open mysql console again and follow these instructions:
  1. mysql -u root -p;
  2. UPDATE mysql.user SET Password=PASSWORD('mypass') WHERE User='root' AND Host = 'localhost';
  3. flush privileges;
  4. quit
Restart All Services
check open your browser and open http://localhost/phpmyadmin/

Post a Comment

0 Comments