Advertisement
Guest User

Untitled

a guest
Apr 4th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. package utils;
  2.  
  3. import com.mysql.jdbc.Connection;
  4. import java.sql.DriverManager;
  5.  
  6. public class ConnectionUtil {
  7. Connection conn = null;
  8.  
  9. public static Connection conDB(){
  10. try {
  11. Class.forName("com.mysql.jdbc.Driver");
  12. Connection con = (Connection) DriverManager.getConnection("jdbc:mysql://remotemysql.com/zMtDLBiD3t", "zMtDLBiD3t", "OakNNO5iy3");
  13. return con;
  14. } catch (Exception ex) {
  15. return null;
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement