1 2 3 4

I would like to have a port on my computer, that forwards to a port on another computer.

   my computer                         another computer
@@@@@@@@@@@@@@@@@@                    @@@@@@@@@@@@@@@@@@
@                @                    @       (C)      @
@                @         ssh        @                @
@ my app -----> 1234 <============> 8080 ---> database @
@                @ (A)  username  (B) @                @
@   ssh client   @         (D)        @   ssh server   @
@@@@@@@@@@@@@@@@@@                    @@@@@@@@@@@@@@@@@@
            

Example

My application on my computer is configured to connect to a database on localhost:1234.
This should connect it to the database on another-computer:8080.