title: How to connect to online mysql database from Java desktop app
body: <p>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.</p>
  
  <p>here is my code:</p>
  
  <pre><code>public Kviz_DAO(){
      try{
          Class.forName("com.mysql.jdbc.Driver");
          konekcija = DriverManager.getConnection("jdbc:mysql://penal.ba:2082/mydatabasename?"+
                  "user=mydbuser&amp;password=mydbpassword");
      }
      catch(Exception ex){
          ex.printStackTrace();
      }
  }
  </code></pre>
  
  <p>Can anyone tell me what i'm doing wrong.</p>