Answers for "mysqli::real_connect(): (hy000/2002): connection refused"

0

mysqli_real_connect(): (hy000/2002): no such file or directory

Locate config.sample.inc.php

Change

$cfg['Servers'][$i]['host'] = 'localhost';
into

$cfg['Servers'][$i]['host'] = '127.0.0.1';
Save.

Then rename the file and remove sample from the name.
Posted by: Guest on March-02-2021
-1

mysqli::real_connect(): (hy000/2002): connection refused

If MySQL Server is up and running - then this looks like some transport (e.g. firewall) problem. First step is to try telnet command below - if it shows an error, then problem is not related to PHP or MySQL :

telnet 66.96.147.118 3306 
(On success it will print mysql version + some random characters)
Posted by: Guest on March-20-2021

Code answers related to "mysqli::real_connect(): (hy000/2002): connection refused"

Browse Popular Code Answers by Language