Click here to Skip to main content
16,006,341 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need to get a program for connecting to mysql server through a proxy server .
i was trying but ...i was not able to find one..........if anybody knows the answer pls post it ASAP


i got the following answer but its not working...anybody plz help


C#
MySqlConnection conn = new MySqlConnection();conn.ConnectionString = 
Host=192.168.0.10;port=3307;user=root;password=root";
conn.ProxyOptions.Host = "10.0.0.1";
conn.ProxyOptions.Port = 808;
conn.ProxyOptions.User = "ProxyUser";
conn.ProxyOptions.Password = "ProxyPassword";
conn.Open();
Posted
Updated 10-Apr-12 21:44pm
v2

Hi Dear Nadir.. plz wait im just on it. wil giv soon..
 
Share this answer
 
C#
NetworkCredential credential=new NetworkCredential("User","Password");
WebProxy proxy=new WebProxy("10.0.0.1",808);
proxy.Credentials=credential;

MySqlConnection conn = new MySqlConnection();conn.ConnectionString = 
Host=192.168.0.10;port=3307;user=root;password=root";
conn.Proxy=proxy;


Still you have problem check your network ,Permission,and connectionstring (

add "Protocol" attribute may help you)
 
Share this answer
 
Comments
Nadir Muhammed 12-Apr-12 8:11am    
thanx binson....thanx
i have one more question....which is the mysql connector that supports proxy...
When iam using this code
conn.Proxy=proxy;
it shows that does not contain a defenision for proxy
Kieran Crown 11-Mar-13 11:03am    
Did you ever find a solution to this as I'm having the same problem

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900