NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Does DB Client support SSH Tunneling?


Joined: 14 Sep 2010
Posts: 18
Reply with quote
I think I need the DB Client to use SSH tunneling - does it currently do this? If so, how can I set it up?

My server admin tells me that "you need to ssh in first to make the connection as only port 22 is open".

When I try to connect I get this error: "Lost connection to MySQL server during query"

Thanks.
View user's profileFind all posts by hurrakanSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
"Lost connection to MySQL server during query" is something that I never saw working with mysql. Probably, the closest error is "server gone" and it means that connection timed out on the server. If so, you may want to adjust mysql settings to allow long queries to finish without timeout.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 14 Sep 2010
Posts: 18
Reply with quote
Actually, I think it's more likely that I'm not even connecting to the database at all.

I'm now using a separate paid application (SQLyog) to connect to my remote MySQL databases.

SQLyog allows me to use an SSH Tunnel, e.g.

SSH Host Address = Remote IP
SSH Port = 22

MySQL Host Address = 127.0.0.1
MySQL Port = 3306

Is there any chance of the "DB Client" in Nusphere PhpED supporting SSH tunnelling?
View user's profileFind all posts by hurrakanSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
I don't think PhpED supports SSH Tunnelling but you can use Bitvise Tunnelier to create tunnels.

Install Tunnelier on the PhpED computer, add an SSH profile to Tunnelier and check it can login. There are lots of settings available but you probably can ignore most of them and just set the Login details.

Then use C2S Forwarding (Client to Server) and add something like this:

Status: Enabled
Listen Interface: 127.0.0.1
Listent Port: 1234 (or whatever port you want to use, but not a port that is used for anything else)
Destination Host: localhost
Destination Port: 3306

Then from PhpED you connect your MySQL database to host 127.0.0.1 and port 1234. Tunnelier must be running with the profile loaded and logged in, then you will be able to connect with PhpED.

The same tunnel can be used for multiple databases on a single host. If you want to use multiple hosts at the same time then you can have multiple Tunneliers and each one must use a different port.

If you use SSH then Tunnelier is an excellent tool.
View user's profileFind all posts by plugnplaySend private message


Joined: 14 Sep 2010
Posts: 18
Reply with quote
Thanks,

I'll try Tunnelier - it looks promising.

I tried to set up tunnelling using Putty etc. but it never worked - although I think it got close a few times, maybe.
View user's profileFind all posts by hurrakanSend private message
Does DB Client support SSH Tunneling?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic