Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DatebaseHandler {
- Connection dbConnectoin;
- public Connection getDbConnectoin()
- throws ClassNotFoundException, SQLException{
- String connectionString = "jdbc:mysql://localhost:3306/programma?autoReconnect=true&useSSL=false";
- Class.forName("com.mysql.cj.jdbc.Driver");
- dbConnectoin = DriverManager.getConnection(connectionString, "root","password");
- return dbConnectoin;
- }
Add Comment
Please, Sign In to add comment