Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- host = "localhost";
- port = 3306;
- database = "lemnos";
- username = "root";
- password = "";
- table = "playerData";
- try {
- synchronized(this)
- {
- if(getMainConnection() != null && !getMainConnection().isClosed()) {
- return;
- }
- try
- {
- Class.forName("com.mysql.jdbc.Driver");
- }
- catch (ClassNotFoundException f)
- {
- f.printStackTrace();
- }
- this.setConnection(DriverManager.getConnection("jdbc:mysql://" +this.host+ ":" +this.port+ "/" +this.database+ "?useSSL=false", this.username, this.password));
- System.out.println("######## MySQL connecté ########");
- }
- }
- catch(SQLException f)
- {
- f.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement