roman syed
roman syed

Reputation: 49

when I start apache MySQL server, I get error " (HY000/2002): No connection could be made because the target machine actively refused it."

after the start apache server, i could not access PHPMyAdmin. when i try to access i get an error and auto-stop MySQL server.

enter image description here


 - 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.
 - phpMyAdmin tried to connect to the MySQL server, and the server
   rejected the connection..

how can i solve this error

Upvotes: 2

Views: 5723

Answers (2)

Saad
Saad

Reputation: 105

If you are on Windows os and the above solution does not work, just check if your mysql is running with "netstat -ano" command, if the services are not running just try starting the mysql service.

Upvotes: 0

Priyesh Shukla
Priyesh Shukla

Reputation: 16

Add below line under config.inc.php

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

Upvotes: 0

Related Questions