Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package dbUtil;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- public class dbConnection {
- private static final String USERNAME = "haccptem_admin";
- private static final String PASSWORD = "Slawo1995";
- private static final String SQCONN = "jdbc:mysql://185.24.218.5:3306/haccptem_1";
- public static Connection getConnection() throws SQLException {
- System.out.println(" Database user: " + USERNAME);
- System.out.println(" Database password: " + PASSWORD);
- System.out.println(" Database URL: " + SQCONN);
- System.out.println(" ------- Data are correct ---------");
- System.out.println("===========================================");
- System.out.println(" DATABASE CONNECTED ");
- return DriverManager.getConnection(SQCONN, USERNAME, PASSWORD);
- }
- }
Add Comment
Please, Sign In to add comment