1

I run XAMPP, a few days back i had set up a password for the root password through phpmyadmin I am not able to access phpMyAdmin ever since that moment

I followed help on this link but everything seems fine there (in config.inc.php). I even tried unistalling xampp fully, restarting windows and then reinstalling xampp, but still pointing to localhost/phpmyadmin I get the following error

MySQL said: 
Cannot connect: invalid settings. 
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.

I Also tried to reset root password through mysqld.bat as given on mysql's website help but to no avail

Please Help!

1
  • 1
    What does a telnet on localhost:3306 output?
    – Maxwell
    Aug 14, 2009 at 8:43

5 Answers 5

4

Edit the config.inc.php file. You can find it in "C:\xampp\phpmyadmin\" and change ~line 21:

$cfg['Servers'][$i]['password'] = ''; to $cfg['Servers'][$i]['password']  = 'yourPassHere';

Save, and access phpmyadmin again. This will avoid you from having to change the password as stated by Maxwell.

2

in my case the problem had been solved with changing '127.0.0.1' to 'localhost' !!

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';

to >>>

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = 'localhost';

good job

1

You can reset the Mysql password trought the cli by running it with the --skip-grant-tables option, next you'll be able to log in with the root user without a password and issue

UPDATE user SET Password=PASSWORD('newpwd') WHERE User='root';
flush privileges;
exit;

Next, restart MySQL normally.

Hope this helps.

1

I have found a fix.

Go to this directory C:\xampp\phpMyAdmin\config.inc.php and change the following values to whatever is appropriate for you.

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'password'; // which is default setting in xampp server
1

I found the fix. go to config.inc.php find the following line of code:

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

If allow no password is true make it false. If the password is empty, input the password value which you had changed earlier from the phpmyadmin dashboard before you had the error message.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .