Cannot connect java to remote Mysql database server -
i created account database on site: byethost and i'm trying connect code works when try connect local database on computer. main.datasource.setservername("sql201.byethost33.com"); main.datasource.setdatabasename("b33_16132071_pizza_service"); main.datasource.setuser("myuser"); main.datasource.setpassword("mypassword"); try( connection connection = main.datasource.getconnection() ){ labstatus.settext("connection " + databasename + " succeed"); labstatus.setstyle("-fx-text-fill: green"); showloginbuttons(); }catch(exception ex){ labstatus.settext("connection " + databasename + " failed"); labstatus.setstyle("-fx-text-fill: red"); exceptiondialog exceptiondialog = new exceptiondialog("couldn't reach connection", ex); exceptiondialog.show(); } i error: com.mysql.jdbc.exceptions.j...