View Single Post
  #2  
Old 02-16-2007, 08:29 AM
rian rian is offline
Senior Member
 
Join Date: Jul 2006
Posts: 135
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 18
rian is on a distinguished road
Default

Try to make a telnet localhost 3306 to see what's going on. Then check that you don't have another copy of MySQL local, using the same port, in that case you can make an ssh tunnel to the remote server, opening a new local port eg. 3030:

SSH TUNNEL:

nohup ssh -l root -a -g -N -x -T -L 3030:REMOTESERVERIP:3306 REMOTESERVERIP &

Make sure you have a rule in the remote server iptables to allow REMOTESERVERIP to connect to that MySQL locally, eg.

IPTABLES RULE:

-A INPUT -s REMOTESERVERIP -p tcp -m tcp --dport 3306 -j ACCEPT

The applications running MySQL must use the port 3030 instead of 3306. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - connection over ssh tunnel???
View Single Post
  #2  
Old 02-16-2007, 08:29 AM
rian rian is offline
Senior Member
 
Join Date: Jul 2006
Posts: 135
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 18
rian is on a distinguished road
Default

Try to make a telnet localhost 3306 to see what's going on. Then check that you don't have another copy of MySQL local, using the same port, in that case you can make an ssh tunnel to the remote server, opening a new local port eg. 3030:

SSH TUNNEL:

nohup ssh -l root -a -g -N -x -T -L 3030:REMOTESERVERIP:3306 REMOTESERVERIP &

Make sure you have a rule in the remote server iptables to allow REMOTESERVERIP to connect to that MySQL locally, eg.

IPTABLES RULE:

-A INPUT -s REMOTESERVERIP -p tcp -m tcp --dport 3306 -j ACCEPT

The applications running MySQL must use the port 3030 instead of 3306. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote