Jump to content

How to fix Unable to login to phpMyAdmin in XAMPP: Access denied for user 'root'@'localhost' (using password: NO)


Elite IV
 Share

Recommended Posts

You just changed the root password in the users interface and now you cannot login. You see this?

unable-to-login-phpmyadmin-xampp-password-root.png

Make sure to run notepad++ or the editor of your choice in Administrator mode. Most people store their XAMPP server in the C:\ and for changes of those files usually requires administrator. Notepad++ should prompt you if you want to run it in Admin mode if it cannot save changes.

  • Navigate to "C:\xampp\apache\conf\extra"
  • Find the file "httpd-xampp.conf" edit with Notepad ++
  • At line # 90 to 95, is the code that looks like this:
    Alias /phpmyadmin "C:/Servers/XAMPP/phpMyAdmin/"
    <Directory "C:/Servers/XAMPP/phpMyAdmin">
        AllowOverride AuthConfig
        Require local
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </Directory>

Highlight it all and change it to this:

    Alias /phpmyadmin "C:/Servers/XAMPP/phpMyAdmin/"
    <Directory "C:/Servers/XAMPP/phpMyAdmin">
		AllowOverride AuthConfig Limit
		Order allow,deny
		Allow from all
		Require all granted
	</Directory>

____________________________________________________________________________________________________________________________________________________________________________

 

  • Navigate to "C:\xampp\phpMyAdmin"
  • Find the file "config.inc.php" edit with Notepad ++
  • At line # 18 to 24, is the settings for authentication looks like this:
 
 /* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = ' ';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

 

Highlight it all and change it to this:

 

$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root ';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Lang'] = '';

 

 

We should now get a login page to enter userame and password to enter phpmyadmin successfully on XAMPP.

 

phpmyadmin-login-page.png

 

Alternatively, if you like the more simplified login box like http, you can use this:

image.png

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Lang'] = '';

 

Login with your username and password you edited or created earlier.

 

Enjoy. 😄

 

 

 

 

  • Legend! 1

Community Director of [XtG] - Xtreme Tier Gaming Community AU/NZ

 

Link to comment
Share on other sites

  • Elite IV changed the title to How to fix Unable to login to phpMyAdmin in XAMPP: Access denied for user 'root'@'localhost' (using password: NO)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Terms of Use We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.