Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Connection openConnection() throws Exception {
- Class.forName("com.mysql.jdbc.Driver");
- try {
- return this.conn = DriverManager.getConnection("jdbc:mysql://" + this.host + ":" + this.port + "/" + this.database, this.user, this.password);
- } catch (MySQLNonTransientConnectionException e) {
- System.out.println(this.database);
- e.printStackTrace();
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement