Advertisement
Szymon3810

Mysql Gildie

Jul 25th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. Class.forName("com.mysql.jdbc.Driver");
  2. String url = "jdbc:mysql://" + this.plugin.configManager.mysqlHost + "/" + this.plugin.configManager.mysqlBase;
  3. return DriverManager.getConnection(url, this.plugin.configManager.mysqlUser, this.plugin.configManager.mysqlPass);
  4.  
  5. this.plugin.getConfig().set("config.mysql.host", this.mysqlHost);
  6. this.plugin.getConfig().set("config.mysql.base", this.mysqlBase);
  7. this.plugin.getConfig().set("config.mysql.user", this.mysqlUser);
  8. this.plugin.getConfig().set("config.mysql.password", this.mysqlPass);
  9.  
  10. this.mysqlHost = this.plugin.getConfig().getString("config.mysql.host");
  11. this.mysqlBase = this.plugin.getConfig().getString("config.mysql.base");
  12. this.mysqlUser = this.plugin.getConfig().getString("config.mysql.user");
  13. this.mysqlPass = this.plugin.getConfig().getString("config.mysql.password");
  14.  
  15. mysql:
  16. host: ""
  17. base: ""
  18. user: ""
  19. password: ""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement