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