Problem with getConnection
I have an application that connects to a database but it is very slow, I tried to use ODBC and mysql connector but it is still slow. Here is the code:
The problem is in the method "getConnection". I tried to disable the antivirus, window's firewall, but there is no change. Ping works.
final String USUARIO = "usuario";
final String CLAVE = "clave";
final String BD = "basededatos";
final String SERVIDOR = "jdbc:mysql://ip_del_servidor/"+BD;
public void conectar()
this.conexion = DriverManager.getConnection(SERVIDOR,USUARIO,CLAVE);
if use ODBC :
final String SERVIDOR = "ip_del_servidor";
this.conexion = DriverManager.getConnection("jdbc:odbc:"+BD);
any suggestions ?