"Connection for controluser as defined in your configuration failed" with phpMyAdmin in XAMPP

Viewed 466858

I have just installed XAMPP on my Windows XP machine, and I get an error saying:

Connection for controluser as defined in your configuration failed.

Before I installed XAMPP, I had a MySQL database installed and it had a password. I changed and put the password in config.inc.php for MySQL, and I got this error:

<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
    $uri = 'https://';
} else {
    $uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/xampp/');
exit;
?>

When I try to access index.php, it seems like something is wrong with the XAMPP installation. What can I do to fix this problem?

15 Answers

This worked for me with phpmyadmin under Ubuntu 16.04:

I edited /etc/phpmyadmin/config.inc.php and changed the following 2 lines:

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

on ubuntu /etc/phpmyadmin/config-db.php

make sure the password matches your config.inc.php for the control user

also for the blowfish too short error

edit /var/lib/phpmyadmin/blowfish_secret.inc.php and make the key longer

on ubuntu 18.04 in etc/phpmyadmin/config.inc.php comment all the block

Optional: User for advanced features

on ubuntu, these steps worked for me...

1. sudo gedit /etc/phpmyadmin/config.inc.php.

2. uncomment[remove(/)]  following lines :-

    $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

3. comment[add(/)] following lines :-     

   //$cfg['Servers'][$i]['controluser'] = $dbuser;
   //$cfg['Servers'][$i]['controlpass'] = $dbpass;

So I deleted the phpmyadmin user accidently but not the table and the only and best answer that worked these days have been this one: https://stackoverflow.com/a/40632599/15821993

open the directory /etc/phpmyadmin/ in the terminal and use

sudo nano config-db.php

to open it as a root (other users have no access)

there you can find the username and password of the deleted user. If you want to change them you can do it to whatever you want and safe the file or you reuse them in the next step.

After you got this infos or changed the credentials: login to phpmyadmin console and create a new user for the db phpmyadmin with same username and password as in the file. Grant all rights to the user for this db only and you are done.

logout and login again at phpMyAdmin and all errors are gone.

Related