I pave paid hosting, and i added my database to it. I am trying to connect to this online database from my java desktop application but, i got exception: Communications link failure.
here is my code:
public Kviz_DAO(){
try{
Class.forName("com.mysql.jdbc.Driver");
konekcija = DriverManager.getConnection("jdbc:mysql://penal.ba:2082/mydatabasename?"+
"user=mydbuser&password=mydbpassword");
}
catch(Exception ex){
ex.printStackTrace();
}
}
Can anyone tell me what i'm doing wrong.