Karthikeyan
Karthikeyan

Reputation: 31

phpMyAdmin error: "Cannot connect: invalid settings" in XAMPP

I installed XAMPP and phpMyAdmin was working properly after the installation. But after finishing my work, when I restart my computer, the phpMyAdmin page says access denied and gives an error message, saying "Cannot connect: invalid settings".

Cannot connect: invalid settings

I did not change the username or password. I reinstalled XAMPP many times. It works properly after reinstalling, but it stops working after restarting my computer. The version is 5.5.38.

Upvotes: 1

Views: 10350

Answers (3)

Jenny Holder
Jenny Holder

Reputation: 63

I had a similar problem with MAMP when I first started using it.

There was a file called config.inc.php that I had to edit. This question might help you, it's pretty much the exact thing I did to fix it.

This link will take you to the XAMPP equivalent answer to what I used for MAMP: XAMPP MySQL password setting (Can not enter in PHPMYADMIN)

Specifically this part: (Couldn't get the code in the blockquote)

From "Xampp/phpmyadmin" directory in config.inc.php file find the below code. And follow the given instructions below. I have tried like this and I was successful to run both localhost/phpMyAdmin on browser, MySQL Command prompt as well as MySQL query browser.

$cfg['Servers'][$i]['auth_type']    = 'config';
$cfg['Servers'][$i]['user']         = 'pma';
$cfg['Servers'][$i]['password']     = '';
$cfg['Servers'][$i]['controluser']  = 'user_name/root';
$cfg['Servers'][$i]['controlpass']  = 'passwaord';

And replace the above each statement with the below each corresponding code.

$cfg['Servers'][$i]['auth_type']    = 'config';
$cfg['Servers'][$i]['user']         = 'root';
$cfg['Servers'][$i]['password']     = 'Muhammad Ashikuzzaman';
$cfg['Servers'][$i]['controluser']  = 'root';
$cfg['Servers'][$i]['controlpass']  = 'Muhammad Ashikuzzaman';

Basically, I had to change the file from the defaults to my username and password. After that I never had another login error.

Upvotes: 1

juanitourquiza
juanitourquiza

Reputation: 2194

I use XAMMP on Windows 10.

I had commented these two lines of code.

/* User for advanced features */
//$cfg['Servers'][$i]['controluser'] = 'pma';
//$cfg['Servers'][$i]['controlpass'] = '';

Remove comments and it will work:

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

Upvotes: 0

Isaac Bennetch
Isaac Bennetch

Reputation: 12412

If you don't need any of the features provided by the phpMyAdmin configuration storage, you could edit config.inc.php and remove references to those tables (or, at the least, the lines about controluser, controlpass, and pmadb). If the problem is simply with authenticating the controluser, this will work around that problem.

Upvotes: 0

Related Questions