Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. java.sql.SQLException: The server time zone value 'CEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
  2.  
  3. private String CONN_STRING = "jdbc:mysql://localhost:3306/vmenginedatabaseT04P/"; // "jdbc:mysql://localhost:3306/vm_database_1";
  4.  
  5. private boolean connected ;
  6.  
  7. private Connection connection;
  8.  
  9. public boolean isConnected() {
  10. return connected;
  11. }
  12.  
  13.  
  14. public Connection Connect()
  15. {
  16. Connection conn = null;
  17. try {
  18. Class.forName("com.mysql.cj.jdbc.Driver");
  19. conn = DriverManager.getConnection(CONN_STRING,USERNAME,PASSWORD);
  20. System.out.println("Connected");
  21. connected = true;
  22. return conn;
  23. }catch (SQLException e){
  24. System.err.println(e);
  25. } catch (ClassNotFoundException e) {
  26. e.printStackTrace();
  27. }
  28. return null;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement