Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- try (Connection conn = DriverManager.getConnection(
- "jdbc:mysql://localhost:3306/my_db?useSSL=false&characterEncoding=utf8",
- "root", "coderslab")) {
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- zamiast my_db
- wpisujesz nazwe bazy danych jaka utworzysz
- tam gdzie root
- to nazwa uzytkownika
- a tam gdzie coderslab
- to haslo
- odplasz program jak nie wyrzuci bledu to sie polaczyles jak cos dzwon
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement