October 5, 2021 . 1 MIN READ
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)
Resource: https://stackoverflow.com/questions/32919571/mysqlireal-connect-hy000-2002-connection-refused-on-live