I am trying to figure out how to connect to a remote DB server that can only be reached from the webserver using port forwarding with putty.
Here is the setup: There is a webserver with IP 1.2.3.4 that is allowed to connect to the DB server using a private IP of 2.3.4.5 that is listening on port number 22280. Both servers are hosted at digital ocean.
At the moment i am developing a php based website, using xampp and the database that i use its reachable on localhost 3306.
The question is that is there any way to achive a connection to the DB server behind the webserver using port forwarding? I want to use the dev database on the DB server instead of the one on localhost.
Many thanks. Trix