I have an java app that connects to a database. I have some computers connected in the same router and one of them is supposed to be the server. So in its localhost I created the database with the tables. Let's say that the db is in A, with IP 192.168.0.a and the app is in computer B with IP 192.168.0.b! To access the db from B I must do something like this jdbc:mysql://192.168.0.a:3306/dbName, but if I do not add a user in database with host 192.168.0.b, the app will not work. So the question is: Is there a way to tell the database to accept request from all computers without adding users manually?
Thanks in advance!
-
Are you able to access remote MySql from Workbench?Pradeep Simha– Pradeep Simha2014-09-12 17:52:34 +00:00Commented Sep 12, 2014 at 17:52
-
Yes I can, the problem is only for the application.Dionis Beqiraj– Dionis Beqiraj2014-09-12 17:54:50 +00:00Commented Sep 12, 2014 at 17:54
-
You can grant a permission to user to connect from anywhere.Aleksandr M– Aleksandr M2014-09-12 17:55:40 +00:00Commented Sep 12, 2014 at 17:55
-
See this: stackoverflow.com/questions/14779104/… That shouldn't happen, if you're able to access remotely from Workbench you should be able to access from Java.Pradeep Simha– Pradeep Simha2014-09-12 17:56:09 +00:00Commented Sep 12, 2014 at 17:56
-
what exception is being thrown in your app?Dave– Dave2014-09-12 19:04:48 +00:00Commented Sep 12, 2014 at 19:04
Add a comment
|