Normally, working with XAMPP and meanwhile we try to access phpMyAdmin we face and error  Connection for controluser as defined in your configuration failed . As usual XAMPP has number of features and provide flexibility to create databases with ease. Like Apache Shutdown, we face this error while working  with local server and try to access phpmyadmin. A detailed Error listed below.

#2002 - No connection could be made because the target machine actively refused it.

The server is not responding (or the local server’s socket is not correctly configured). Connection for controluser as defined in your configuration failed.

Connection-for-controluser-phpmyadmin-propatel
Connection for controluser phpmyadmin

Fix: Connection for  Controluser as Defined in Your Configuration Failed.

  1. Open your XAMPP directory usually c:/xampp.
  2. Navigate to the folder phpMyAdmin.
  3. Search for a file config.inc.php(i.e. c:/xampp/phpmyadmin/).

Under
/* User for advanced features */ or search  $cfg[‘Servers’][$i]
Replace

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

With

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

Restart Apache & MySQL

After restarting Apache & MySQL if the error persist. Follow the steps to manually terminate the process using task manager.

  1. Open your task manager.
  2. Search for the process httpd.exe , Right click and click end task.
  3. Right click mysqld.exe and terminate this process.

Turn on again your Apache and MYSQL it will work fine. If any problem persist you can ask question below regarding XAMPP Problem: Connection for  Controluser as Defined in Your Configuration Failed.