Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I tried to connect to mysql database to other computer connected through LAN.
mysqlconnection is like that

C#
MySqlConnection con = new MySqlConnection("server=192.168.30.102;database=LMMS;uid=root;");
con.open();


but it didn't work. it give exception that "Unable to connect to any of the specified MySQL hosts.
I am using xampp for mysql and windows 7 and Visual studio 2010

please helppp..... :/
Posted

1 solution

One possible reason is that your firewall is blocking port 3306 (default mysql port). So ensure that this port can be used for the network traffic.
 
Share this answer
 
Comments
XeeShaN AbbAs 5-Sep-11 17:38pm    
thank you so much...
Wendelius 5-Sep-11 17:55pm    
You're welcome :)

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