Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public static void connect() {
  2. try {
  3.  
  4. conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/database.1?autoReconnect=true&useSSL=false","root","vadmyra9394");
  5.  
  6. System.out.println("Tilkoblet database");
  7. } catch (Exception e)
  8. {
  9. throw new RuntimeException("Unable to connect", e);
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement