3
I have an app Java
and a database MySQL
connected in this application on my machine. The application will be distributed to other machines on the same network, but I can’t connect the banco de dados
for other machines.
The connection works right locally, however, when I try to run the application on another machine on the same network, the connection fails. In Mysql I can access the database remotely. This is the connection code in the application Java
(I’m using NetBeans
).
String connectionUrl = "jdbc:mysql://NOMEDOSERVER:3306/DB";
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection(connectionUrl, "root", "SENHA");
Yes, there is a ping response, but I don’t know if the problem is that I am using my machine as a database server.
– Simone