Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Problem with Tomcat5.5, MySQL connection
- public static Connection openConnection(String database) throws Exception
- {
- Class.forName("com.mysql.jdbc.Driver").newInstance();
- Connection db = DriverManager.getConnection("jdbc:mysql://localhost:3306/" + database, "username", "password");
- db.setAutoCommit(false);
- return db;
- }
Add Comment
Please, Sign In to add comment