Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.Connection;
- import java.sql.DriverManager;
- public class Greeting
- {
- private Connection connect = null;
- public void readDB() throws Exception {
- {
- Class.forName("com.mysql.cj.jdbc.Driver");
- if(DriverManager.getConnection("jdbc:mysql://localhost/todo?useLegacyDatetimeCode=false&serverTimeZone=UTC" + "&user=root&password=F%21%2351j1%5E31fn1%235") != null)
- {
- System.out.println("hello");
- }
- }
- catch (Exception e){
- throw e;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement