Advertisement
Guest User

Untitled

a guest
Apr 11th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import java.sql.Connection;
  2. import java.sql.DriverManager;
  3.  
  4. public class Main {
  5. public static void main(String[] args) throws Exception {
  6. Class.forName("com.mysql.jdbc.Driver");
  7. System.out.println("MySQL Driver loaded");
  8. Connection conn = DriverManager.getConnection("jdbc:mysql://HOST/DATABASE", "USER", "PASSWORD");
  9. System.out.println("Connection obtained");
  10. conn.close();
  11. System.out.println("Done");
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement