Advertisement
Guest User

Untitled

a guest
Dec 12th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. Properties connectionProps = new Properties();
  2. connectionProps.put("user", userName);
  3. connectionProps.put("password", password);
  4. String urlDB = "jdbc:mysql://" + serverName + ":";
  5. urlDB += portNumber + "/" + dbName;
  6. Connection connect = DriverManager.getConnection(urlDB, connectionProps);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement