Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // --- connect to database - start ---
- try {
- Class.forName("com.mysql.jdbc.Drvier");
- this.connection = DriverManager.getConnection("jdbc:mysql://" + host + "/" + databse, username, password);
- System.out.println("Database connection established.");
- }
- catch(Exception e) {
- System.err.println("Cannot connect to database server!");
- }
- // --- connect to database - end ---
Add Comment
Please, Sign In to add comment