Advertisement
Guest User

Untitled

a guest
Mar 29th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. public static void main(String[] args) {
  2.  
  3. try (Connection conn = DriverManager.getConnection(
  4. "jdbc:mysql://localhost:3306/my_db?useSSL=false&characterEncoding=utf8",
  5. "root", "coderslab")) {
  6.  
  7. } catch (SQLException e) {
  8. e.printStackTrace();
  9. }
  10. }
  11.  
  12.  
  13.  
  14. zamiast my_db
  15. wpisujesz nazwe bazy danych jaka utworzysz
  16.  
  17. tam gdzie root
  18. to nazwa uzytkownika
  19.  
  20. a tam gdzie coderslab
  21. to haslo
  22.  
  23.  
  24. odplasz program jak nie wyrzuci bledu to sie polaczyles jak cos dzwon
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement