XAMPP Solution: Connection for controluser as defined in your configuration failed.

I use XAMPP to create a *AMP (apache, MySQL and PHP) stack local-server on my Windows 7 machine.
XAMPP is bundled with phpMyAdmin – a web-based database administration tool.

While trying to access phpMyAdmin days ago, the following error message was displayed:

#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.

MySQL Database access denied via phpMyAdmin

How did I fix the problem?

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

../xampp/phpmyadmin/config.inc.php

Under /* User for advanced features */, Replace


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

With


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

Restart Apache & MySQL and phpMyAdmin should start working.

If after restarting Apache and MySQL and the Access Denied error still persists, open Windows Task Manager and end the following processes: httpd.exe and mysqld.exe and restart Apache and MySQL.

End Apache and MySQL process

Don’t miss out!
Subscribe to My Newsletter
Invalid email address