Advertisement
Guest User

Untitled

a guest
Feb 28th, 2018
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.95 KB | None | 0 0
  1.         url = "jdbc:mysql://adm.minecraft-mania.fr:3306/a12014122813292385692366?useSSL=false";
  2.         host = "adm.minecraft-mania.fr";
  3.         database = "a12014122813292385692366";
  4.         username = "120141228692366";
  5.         password = "vSKz4pnJz9Fxg";
  6.         port = 3306;
  7.         table = "playerData";
  8.        
  9.         try {
  10.             synchronized(this)
  11.             {
  12.                 if(getMainConnection() != null && !getMainConnection().isClosed()) {
  13.                     return;
  14.                 }
  15.                
  16.                 try
  17.                 {
  18.                     Class.forName("com.mysql.jdbc.Driver");
  19.                 }
  20.                 catch (ClassNotFoundException f)
  21.                 {
  22.                     f.printStackTrace();
  23.                 }
  24.                
  25.                 this.setConnection(DriverManager.getConnection(this.url, this.username, this.password));
  26.                
  27.                 System.out.println("######## MySQL connecté ########");
  28.             }
  29.         }
  30.         catch(SQLException f)
  31.         {
  32.             f.printStackTrace();
  33.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement