How to fix Access denied for user 'root'@'localhost' on wnmp using windows 10 code example

Example 1: phpMyAdmin tried to connect to the MySQL server.

/* Answer to: "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." */

/*
  Go to c:\wamp\apps\phpmyadmin3.3.9. Then open/edit the file named:
  config.inc.php

  And in the following line, enter the password that you have setup
  previously:
  $cfg['Servers'][$i]['password'] = '';
  > If your password is "123":
  > $cfg['Servers'][$i]['password'] = '123';

  This should work, if not change this:
  from: $cfg['Servers'][$i]['AllowNoPassword'] = true;
  to: $cfg['Servers'][$i]['AllowNoPassword'] = false;
*/

Example 2: phpMyAdmin access denied message

Open the phpMyAdmin folder.

Open the config.inc.php file with any text editor.

Under “Authentication type and info,and update the following lines:

On $cfg['Servers'][$i]['auth_type'] = 'config'; replace config for cookie.

On $cfg['Servers'][$i]['AllowNoPassword'] = true; replace true for false.

Tags:

Sql Example