I have an architecture which looks like this:
| - DMZ - |
________ | ________ | _______
| CLIENT | | | SERVER | | | MYSQL |
|________| | |________| | |_______|
| |
| <-FIREWALLS-> |
I need to connect from CLIENT (linux) to MYSQL (service running on linux). I cannot access the MYSQL box directly, but I can access the SERVER (linux). The SERVER can access MYSQL. I am trying to setup ssh port forwarding so that I can connect to the MYSQL process from CLIENT. I have executed this on the CLIENT:
ssh -Ngf -L 3306:MYSQL:3306 username@SERVER
This seems to work just fine, but I still cannot access MYSQL. I get an unknown host error. Any ideas what I am doing wrong?
Thanks in advance!
mysql --host=MYSQL --port=3306
is enough to get the unknown host error.