No connection could be made because the target machine actively refused it

Okay, so i tried all of the answers and none of them worked. If you are using different port than 3306 for MySQL you need to specify it in config.inc.php.

So since i was using port 3308, my solution was adding the following line in config.inc.php:

$cfg['Servers'][$i]['port'] = 3308;

add it right bellow the user, password or extension lines.


Go to

C:\Users\YourUser\AppData\Local\Temp

Delete all the files.It will work.


Go to :

xampp/phpmyadmin/config.inc.php

open the file config.inc.php Go to line no:31

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

Change the line to :

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

Restart your system.

Reference


If your operating system is Windows 7:

  • go to control panel -> Administrative Tools -> Services
  • find mysql then right-click, click start

If your operating system is Linux (Ubuntu):

  • in terminal type this command: sudo /etc/init.d/mysql start

Good Luck