2

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

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
roman syed
  • 49
  • 1
  • 6
  • 2
    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) – Areg Oct 22 '19 at 07:21

2 Answers2

0

Add below line under config.inc.php

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

Tschallacka
  • 27,901
  • 14
  • 88
  • 133
0

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.

Saad
  • 105
  • 1
  • 12