Advertisement
Guest User

Untitled

a guest
Sep 13th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. try {
  2. url = "jdbc:mysql://" + mysqlHost + ":3306/" + mysqlDatabase;
  3. Class.forName("com.mysql.jdbc.Driver").newInstance();
  4. conn = DriverManager.getConnection(url, mysqlUser, mysqlPassword);
  5. } catch (Exception e) {
  6. System.err.println("Error trying to connect to the database! "+ url + ", " + mysqlUser + ", " + mysqlPassword);
  7. e.printStackTrace();
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement