I can't access mysql databases from servlets, using mmjdbc.
When a servlet tries to execute:
Connection conn = DriverManager.getConnection(
jdbc:mysql://archive.infn.it/work?user=...password=...);
it always gets this exception:
java.sql.SQLException: Cannot connect to MySQL server on
: Accessing mysql database from a servlet
It is exactly what I do. But in a normal java application it works,
while in a servlet it doesn't.
Luigi Fonti
Nguyen Trong Phuc wrote:
this is the way to connect to MySQL from JDBC:
Class.forName(driverName).newInstance();
Connection con