0

Error MySQL said: Documentation

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). mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. Connection for controluser as defined in your configuration failed. mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it.

I get this error when I start the browser. Thanks in advance. Immediate help is appreciated.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Snehal
  • 1
  • 4
    Possible duplicate of [#2002 - No connection could be made because the target machine actively refused it](https://stackoverflow.com/questions/17707961/2002-no-connection-could-be-made-because-the-target-machine-actively-refused) – Ron Nabuurs Apr 12 '18 at 07:30

2 Answers2

0

I have run MYSQL on port 3333, it will change the port inside of config.inc.php file.

$cfg['Servers'][$i]['host'] = '127.0.0.1' 

to   

$cfg['Servers'][$i]['host'] = '127.0.0.1:3333'

It works, Fine!

Thanks!

Rokonz Zaz
  • 166
  • 1
  • 7
0

Great, I was trying for last two days. But no help and guide worked. After reading your answer, I am happy and it worked.

Xampp/phpmyadmin/Config.inc.php was changed and now works fine.

/* Bind to the localhost ipv4 address and tcp */ $cfg['Servers'][$i]['host'] = '127.0.0.1:3307'; #added the port number if it is not 3306 the default $cfg['Servers'][$i]['connect_type'] = 'tcp';