Hi everyone.
I am trying to create an SSH tunnel for mysql.
The situation is that i want my development server to tunnel to the live database which is behind a firewall.
I have set it up to forward the port to my development machine by doing the following;-
Now it seems to have worked as i tested with
nc -v localhost [port]
But when i try and connect with mysql from the comamnd line it says i cannot connect.
I think that i am not tuneling from the right place.
My dev machine can access the web servers directly but not the live DB, so the user@machine stuff in my tunnel command was for one of the webservers, is that right.
Any tips would be great, thanks.
Jez
I am trying to create an SSH tunnel for mysql.
The situation is that i want my development server to tunnel to the live database which is behind a firewall.
I have set it up to forward the port to my development machine by doing the following;-
Code:
ssh -v -L [port on my dev machine]:[ip address of live DB]:[port of live db] [user]@[one of the machines that can access the live db]
Now it seems to have worked as i tested with
nc -v localhost [port]
But when i try and connect with mysql from the comamnd line it says i cannot connect.
I think that i am not tuneling from the right place.
My dev machine can access the web servers directly but not the live DB, so the user@machine stuff in my tunnel command was for one of the webservers, is that right.
Any tips would be great, thanks.
Jez