I'm creating a server application that clients will connect to. The server application is running on an Ubuntu Server 14.04.1 VPS. The server needs to be able to connect to a MySQL database hosted on a web server. This should be easy to do normally, but my web host, Namecheap, requires an SSH tunnel instead of directly connecting to a database externally.
If the server was running on Windows, I'm able to set up a simple tunnel with PuTTY to the webserver, but I am unsure on how to do this on a linux system.
It's hard to find information on this, because whatever I look up assumes I'm trying to create a tunnel from a personal Windows computer to a Linux VPS. How can I create a tunnel to a database as described in this link on Ubuntu Server rather than Windows, which has GUI tools like PuTTY that make it easier? (I'm very new to the Linux world)
The tunnel I created in PuTTY (When testing on Windows) looks like: L3306 127.0.0.1:3306