Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
- package mftis;
- import java.sql.*;
- public class DBconnect {
- private Connection con;
- private Statement st;
- private ResultSet rs;
- public DBconnect(){
- try{
- Class.forName("com.mysql.jdbc.Driver");
- System.out.println("Success in using the Driver");
- con = DriverManager.getConnection("jdbc:mysql://mysql.hostinger.ph/u366906409_mftis","u366906409_mftis","mftis2016");
- st = con.createStatement();
- }catch(Exception e){
- System.out.println(e);
- }
- }
- }
- private void btnLoginActionPerformed(java.awt.event.ActionEvent evt) {
- DBconnect connect = new DBconnect();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement