Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- private static final String URL = "jdbc:mysql://localhost:3306/mydbtest?useSSL=false";
- private static final String LOGIN = "root";
- private static final String PASSWORD = "root";
- public static void main(String[] args) {
- Connection connection = null;
- try {
- connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/mydbtest?useSSL=false", "root", "root");
- if(!connection.isClosed()){
- System.out.println("TRUE");
- }
- } catch (SQLException e) {
- System.err.println("Невозможно подлючиться к БД!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement