Zann
Zann

Reputation: 85

Connection for control user as defined in your configuration failed. xampp

when i tried to uninstall xampp and reinstall xampp.I received below error message when i go phpmyadmin

Need help and guide to solve it .thanks

Error

MySQL said: Documentation

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

Connection for controluser as defined in your configuration failed.

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.

Upvotes: 5

Views: 54457

Answers (6)

Hossein SB
Hossein SB

Reputation: 46

Navigate to the phpMyAdmin folder in XAMPP open the file config.inc.php which can be found in the following path:

In Windows C:\xampp\phpmyadmin\config.inc.php

Under /* User for advanced features */, Replace

$cfg['Servers'][$i]['controluser'] = 'pma';

With

$cfg['Servers'][$i]['controluser'] = 'root';

If you set password for user 'root' then edit These lines in same File:

Under /* Authentication type and info */ Write your password

$cfg['Servers'][$i]['password'] = 'your_Password';

Under /* User for advanced features */, Write your password

$cfg['Servers'][$i]['controlpass'] = 'your_Password';

Upvotes: 1

Obmerk Kronen
Obmerk Kronen

Reputation: 15959

Try changing localhost to 127.0.0.1 . On my machine this was the culprit..

Upvotes: 2

Deepak Kumar
Deepak Kumar

Reputation: 1

enter image description here

It create problem to install any software with same like skype ... Or you start xampp later login to skype So Please start before xampp login skype ... No error will be appear

Upvotes: -3

Fred Ondieki
Fred Ondieki

Reputation: 2504

Basically what is happening here is that you have wrong credentials in your[ .../phpMyadmin/config.inc.php] file .This occurs if you have another mysql instance installed and the username and the passowrd that you use in this file is different.You have to change the username and the password in the above file to match.

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root'; //Change this to your values
$cfg['Servers'][$i]['password'] = 'root';  //Change this to your values
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

Upvotes: 7

Leads Olutions
Leads Olutions

Reputation: 27

I had a similar issues fresh install and same error surprising. After trying couple of forum help nothing seem to work and I thought it can't be that difficult...what was I missing with a new install?

Finally I figured out "COOKIES" AHA I love that Yummy Cookies but here we are talking about browser cookies...

  1. Try cleaning your browser coookies and see it helps to resolve this issue, before even trying any configuration changes.

  2. Try using XAMPP Control panel "Admin" button instead of usual http://localhost or http://localhost/phpmyadmin

  3. Try direct link: http://localhost/phpmyadmin/main.php or http://127.0.0.1/phpmyadmin/main.php

  4. Finally Try this: http://localhost/phpmyadmin/index.php?db=phpmyadmin&server=1&target=db_structure.php

Somehow if you have old installation and you upgraded to new version it keeps track of your old settings through cookies.

Upvotes: -3

René Höhle
René Höhle

Reputation: 27305

Perhaps you have set a new password during the installation of xampp.

First solution: Delete the complete XAMPP folder after installation but safe the htdocs folder before.

Second: Go to the config file "phpmyadmin/config.inc.php" there are the information for the control user. Check the values.

Third option: Take a console a call the programm "xampp/mysql/bin/mysql.exe" when you use Windows with this you can connect to the database. Something like "mysql.exe -uroot -p".

Upvotes: 1

Related Questions