Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection connection = ConnectToMeetDB.getConnection("root", "asdASD123", "176.59.138.112", 3306);
- public static Connection getConnection(String userName, String password, String serverName, int portNumber) throws SQLException {
- Connection conn = null;
- Properties connectionProps = new Properties();
- connectionProps.put("user", userName);
- connectionProps.put("password", password);
- connectionProps.put("useSSL", "false");
- conn = DriverManager.getConnection(
- "jdbc:mysql://" +
- serverName +
- ":" + portNumber + "/" + "meetdb",
- connectionProps);
- return conn;
- }
Add Comment
Please, Sign In to add comment