I got this problem, let's see if some one here can give me a hand with it.
I got a website hosted in a computer, with its own database, and I can access it from any computer using the domain pointing to it or its public address.
Using PHP I'm running a little script (on my website) that connects to another database and brings some information; the thing is that this other database is hosted in a computer within a VPN (using Hamachi) where the client doesn't have access but the server does.
If I connect from the server using
Mysql -h (IP_ADDRESS_ON_THE_VPN) -u user -p
It connects perfectly, so no firewall problem / connection problem.
But if I open the PHP script from a client, it says:
"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. "
in other words: timeout...
Another test I made is connect the client to the VPN, and that way works perfectly!, strage... doesn't PHP run on the server? What't the best approach here?
Thanks for you time.