Advertisement
Guest User

Untitled

a guest
May 14th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. /**
  2.  *
  3.  * @author Daniel
  4.  */
  5.  
  6. package server.connect;
  7.  
  8. import java.sql.Connection;
  9. import java.sql.DriverManager;
  10.  
  11. public class MySQL {
  12.  
  13.     public MySQL() {
  14.         try {
  15.             Class.forName("com.mysql.jdbc.Driver").newInstance();
  16.             DriverManager.getConnection("jdbc:mysql://localhost/chars", "root", "lol not real pass :DD");
  17.         } catch(Exception e) {
  18.             e.printStackTrace();
  19.         }
  20.     }
  21.  
  22.     public static Connection conn;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement