Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- Class.forName("com.mysql.jdbc.Driver").newInstance();
- conn = DriverManager.getConnection("jdbc:mysql://localhost/correctDBname", "correctUsername", "correctPassword");
- } catch(ClassNotFoundException | SQLException ex) {
- Logger.getLogger(SqlConnection.class.getName()).log(Level.SEVERE, ex.getMessage(), ex);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement