0

All the time i'm trying to open phpMyAdmin in wamp server and trying to login by the default username and password i.e. 'root' and '' respectively it's showing the same error.

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

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

Even after uninstalling wamp and then reinstalling it's showing the same error.

i have gone through the entire post related to the issue and everywhere its asked to login using username =root and password ="NULL" but that doesn't work for me.

Community
  • 1
  • 1
user3557296
  • 31
  • 1
  • 2
  • 3

3 Answers3

3

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

A) 1: Go to Local Disk(c) drive

2: Select Wamp server

3: Select apps folder

4: Select phpmyadmin4.1.14

5: Find config.inc.php Edit with notpad++

6: Find this lane,$cfg['Servers'][$i]['password'] = '';

7: Give password('admin') same as Mysql

Example,

  mysql root password :admin 
  phpmyadnin password :admin 

Thank you

0

Check if you can log into your server from command line or using some tool, for a decent all-around tool I recomment Workbench from MySQL

If you trust your localhost, then GRANT privileges to root connecting from localhost without password. Note that no password and empty string password are not the same:

GRANT ALL ON *.* TO 'root'@'localhost';
# all db's --^ ^     ^      ^         ^
# all tables --|     |      |         |
# username ----------|      |         |
# host connected from ------|         |
# no IDENTIFIED BY, no password ------|

Depending on your server configuration (your desktop since you are using wamp) it may also be necessary to GRANT same permissions to 'root'@'127.0.0.1'. Although localhost translates to 127.0.0.1 in IPv4, it has other meanings.

Dima Tisnek
  • 11,241
  • 4
  • 68
  • 120
0

You can try using the suggestions in the answer already posted here: https://stackoverflow.com/a/11483057/3537029

It says that you have to edit phpMyAdmin config file:

$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = '**your-root-username**';
$cfg['Servers'][$i]['password'] = '**root-password**';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

If it still doesn't works, you could do as suggested in the first comment on the link above : Replace the $cfg['Servers'][$i]['auth_type'] = 'config'; to $cfg['Servers'][$i]['auth_type'] = 'cookie';

Community
  • 1
  • 1
Liviu Jianu
  • 110
  • 8