Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.Connection;
- import java.sql.DriverManager;
- public class Main {
- public static void main(String[] args) throws Exception {
- Class.forName("com.mysql.jdbc.Driver");
- System.out.println("MySQL Driver loaded");
- Connection conn = DriverManager.getConnection("jdbc:mysql://HOST/DATABASE", "USER", "PASSWORD");
- System.out.println("Connection obtained");
- conn.close();
- System.out.println("Done");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement