I’m trying to a get a connection to my database on domain server one.com
Code:
{
try{
Class.forName("com.mysql.jdbc.Driver"); //open driver connection
System.out.println("Driver indlæst");
Connection forb = DriverManager.getConnection
("jdbc:mysql://
http://mysql.blabla.com/bla_com ","username","password");
System.out.println("Forbindelse oprettet");
stmt = forb.createStatement();
}catch (Exception e) {System.out.println("no connection to your database");}
}
It doen’t seem to work do you have any ideas of what is wrong
Info:
MySQL:
Host: localhost
Database: bla_com
Brugernavn (User): username
Kodeord (Password): password
PhpMyAdmin:
PhpMyAdmin:
http://phpmyadmin.bla.comBrugernavn (User): bla_com
Kodeord (Password) blabla