Advertisement
Guest User

Untitled

a guest
Mar 31st, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1.     Connection con = null;
  2.     String url = "jdbc:mysql://localhost/Unity";
  3.     String user = "root";
  4.     String password = "root";
  5.  
  6.  
  7.     public void CONNECT() {
  8.         try {
  9.             Class.forName("com.mysql.jdbc.Driver");
  10.  
  11.             con = DriverManager.getConnection(url, user, password);
  12.  
  13.         } catch (Exception ex) {
  14.             System.out.println("Not working");
  15.         }
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement