Advertisement
Guest User

Untitled

a guest
Oct 10th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package moviehouserentalsystem;
  7. import java.sql.*;
  8. /**
  9. *
  10. * @author l22x08w29
  11. */
  12. public class Admin {
  13. private static final String USERNAME="root";
  14. private static final String PASSWORD="root";
  15. private static final String CONN_STRING="jdbc:mysql://localhost:3306/mysql?movie house rental";
  16. // jdbc:mysql://localhost:3306/mysql?movie house rental=convertToNull [root on Default schema]
  17. public static void main(String[] args){
  18. // TODO code application logic here
  19. Connection conn = null;
  20. try{
  21. conn = DriverManager.getConnection(CONN_STRING, USERNAME, PASSWORD);
  22. System.out.println("Connected");
  23. }catch(SQLException e){
  24. System.err.println(e);
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement