Showing results for 
Show  only  | Search instead for 
Did you mean: 

Remote MySQL access issue from IIS(localhost) PHP code

Hi, My localhost PHP application(pdo connection, php 7.2) is accessing Remote MySQL 5.6 without any problem from 3 months with cPanel(shared hosting) IP address(no port) after migration to cpanel. MySQL Workbench also working. But suddenly from last week local PHP application is not working because it can't able to connect to remote mysql. But workbench is working fine, so my home ip address is in white list. What might be issue locally with PHP? The connection string and everything is fine and working till last week. I tried with IP along with port and host name with port, nothing didn't work. Please advice.


The plesk remote mysql also have the same problem with PHP, but working fine with workbench.

Called support also, no clue because it is working from my local workbench.


Error Message : SQLSTATE[HY000] [2002] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.