Peter Connolly
Peter Connolly

Reputation: 5

Cant access phpMyAdmin after changing the privileges username and password (ERROR1405)

I can't seem to get back into phpMyAdmin after changing the privileges, I keep getting the following error:

ERROR 1405

MySQL said: Documentation

1045 - Access denied for user '‘root’'@'localhost' (using password: YES)

I am using XAMPP on a mac. Not sure on how to go about fixing this, any ideas?

Upvotes: 0

Views: 1913

Answers (1)

Vivek Mahto
Vivek Mahto

Reputation: 314

You have to go to C:\xampp\phpMyAdmin\config.inc.php and edit the file. The default file (without any password being set) looks like this.

<?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;

/* 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'] = '';
  • If you remember the password then you can directly enter that in the password field.
  • if you don't remember setting any password and it still shows some value then change it to '' (empty string).
  • If this doesn't work then open the command line interface as a administrator and type sc delete mysql. This would delete the previous settings which you did in the mysql.
  • Now restart now xammp server and open phpMyAdmin.

Upvotes: 1

Related Questions