Warning: mysqli_real_connect(): (HY000/2002): Connection refused in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91 code example

Example: 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)

Tags:

Misc Example