I have been developing a MySQL database backup and restore appliation in windows forms. This application crates a dump of a mysql database at remote location and imports everything from the dump file back into local mysql database.

MySQL database is located at the server which hosts my php website. So it is obvious that if i want to access that mysql server from my local network, i have to allow mysqlserver at remote location to allow me to connect from my company's local network, by adding the public ip of my network in the lists of ip that remote mysqlserver can allow connections from. I set this thing in CPanel.

It's working fine.

But my question is that, i have anathor software called let's say mysqlyog, that can connect to remote mysqlserver without allowing my local networks ip in the cpanel of remote server.

So i mean to say that if mysqlyog can do that, why my application can't do that the same way msqlyog does.

What kind of mechanism do they apply?
i just don't know how to do this in windows forms and C#.

how do they bypass the firewalls and or just connect to remote mysqlserver.

What is the trick?

But my question is that, i have anathor software called let's say mysqlyog, that can connect to remote mysqlserver without allowing my local networks ip in the cpanel of remote server.

So i mean to say that if mysqlyog can do that, why my application can't do that the same way msqlyog does.

What kind of mechanism do they apply?
i just don't know how to do this in windows forms and C#.

how do they bypass the firewalls and or just connect to remote mysqlserver.

What is the trick?

SQLyog uses tunneling for connections which involve firewalls, one way is to tunnel over SSH, but this requires SSH (shell) access to your server for it to work.

The other trick they use is HTTP Tunneling which only works if you upload a php file to the server, and setting up SQLyog to use the file you've uploaded to the server.

So for your application is to either write a php script to 'tunnel' you data (which tends to be significant slower).

But in this case tunneling over SSH seems the way to go.

Here's a good article about SSH tunneling in C#.

http://www.codeguru.com/csharp/.net/net_security/encryption/article.php/c14829__1/

good luck.
Marc

Hi Marc, thanks a lot for the reply,

finally i got someone telling me something.

I will definitely try this
If you know a lot about this please help me, i am really stuck
Please add me in your messenger:

My id is randhir.uba@gmail.com
My skype id is randhir.uba

or if you use other please let me know, skype would also be good

Thanks again

This article has been dead for over six months. Start a new discussion instead.