Advertisement
Guest User

Untitled

a guest
Jan 25th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. Class.forName("com.mysql.jdbc.Driver");
  2. // Setup the connection with the DB
  3. Properties info = new Properties();
  4. info.put("characterEncoding", "UTF-8");
  5. info.put("user", "root");
  6. info.put("password", "");
  7. info.put("autoReconnect", "true");
  8. info.put("useSSL", "false");
  9. info.put("failOverReadOnly", "false");
  10. info.put("maxReconnects", "10");
  11. info.put("connectTimeout", "2000");
  12.  
  13. DriverManager.setLoginTimeout(10);
  14. mConnection = DriverManager.getConnection("jdbc:mysql://192.168.100.10:8080/flats_flx", info);//here it's stuck
  15.  
  16. mStatement = mConnection.createStatement();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement