0

So here's the scenario:

I can now access wamp server using other connected Lan Computers by using my IP Address,

I develop a program and use this Connection String

MySqlConnection conn = new MySqlConnection("datasource=localhost;database=sampledatabase;userid=root;password=");

this Connection works,

Now my Problem is, I attempt to use the program in other Lan computers, I got error because it listens to their default localhost, So i change the connection string to a static IP MySqlConnection conn = new MySqlConnection("datasource=192.168.1.21,80;userid=root;password=");

Now I got problem too, this doesnt work to my program, How can i fix my connection string using my IP? Please help thanks

Ted
  • 1
  • 4
  • I also used server=127.0.0.1 as well, definitely works, and change it to my ip, doesnt work.. Do i need to change the ip in wamp server? – Ted Nov 18 '15 at 07:11
  • What about the ', 80' in your connection string, are you trying to use a custom port? Do you get an error message? – Stefan Nov 18 '15 at 08:04
  • Edited http.conf in wamp server, i just listen to 192.168.1.21:80 and listen to localhost, but in program i get an error when trying to use my ip and port instead of using localhost – Ted Nov 18 '15 at 08:16
  • NO, i dont use a custom port – Ted Nov 18 '15 at 08:18
  • Possible duplicate of [How to allow remote connection to mysql](http://stackoverflow.com/questions/14779104/how-to-allow-remote-connection-to-mysql) – Kemal Kefeli Nov 18 '15 at 08:38

0 Answers0