Guest User

Untitled

a guest
Dec 2nd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public class DBConnection {
  2. private final static String DB_URL = "jdbc:mysql://localhost:3306/web_training?autoReconnect=true&useSSL=false";
  3. private final static String USER = "root";
  4. private final static String PASSWORD = "root";
  5.  
  6. public static Connection getConnection() throws SQLException {
  7. return DriverManager
  8. .getConnection(DB_URL, USER, PASSWORD);
  9. }
  10. }
  11.  
  12. <dependency>
  13. <groupId>mysql</groupId>
  14. <artifactId>mysql-connector-java</artifactId>
  15. <version>5.1.38</version>
  16. </dependency>
  17.  
  18. java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/web_training?autoReconnect=true&useSSL=false
Add Comment
Please, Sign In to add comment