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

MySqlConnection con = new MySqlConnection("server=;database=LMMS;uid=root;");;

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..... :/

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
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