Guest User

Untitled

a guest
Aug 10th, 2018
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public static Connection con = null;
  2. public static Statement stmt;
  3. public static boolean connectionMade;
  4.  
  5. public static void createConnection() {
  6. try {
  7. Class.forName("com.mysql.jdbc.Driver").newInstance();
  8. String IP="pkpassage.co.uk";
  9. String DB="web86-vote";
  10. String User="web86-vote";
  11. String Pass="kauwgom1";
  12. con = DriverManager.getConnection("jdbc:mysql://"+IP+"/"+DB, User, Pass);
  13. stmt = con.createStatement();
  14. } catch (Exception e) {
  15. Logger.log("VoteManager", "Connection to SQL database failed!");
  16. e.printStackTrace();
  17. }
  18. }
Add Comment
Please, Sign In to add comment