Jump to content

Featured Replies

  • Replies 422
  • Views 63k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • 2 weeks later...
comment_83558

Hey,

 

Does anyone know where I am going wrong with MySQL and getting the server to run.

discord: Taco#3811

 

 


        HikariConfig config = new HikariConfig();
        // For some reason, we need to explicitly specify the timezone to prevent a stacktrace of "EDT" unrecognized.
        String url = "jdbc:sqlserver://"
        		+ properties.getProperty("host")
        		+ "/" + properties.getProperty("database")
        		+ ";serverTimezone=" + properties.getProperty("serverTimezone")
        		+ ";integratedSecurity=true";
        log.info("Creating mysql database service [{}] with url: {}", name, url);
        config.setJdbcUrl(url);
        config.setDriverClassName("com.mysql.cj.jdbc.Driver");
        //config.setDriverClassName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
        config.setAutoCommit(false);
        config.setRegisterMbeans(true);
        config.setPoolName(name);
        config.setMinimumIdle(Integer.parseInt(properties.getProperty("maximumConnections")));
        config.setConnectionTimeout(30_000);
        config.setMaximumPoolSize(512);
        config.setLeakDetectionThreshold(60_000);
        //config.setUsername(properties.getProperty("username"));
        //config.setPassword(properties.getProperty("password"));
        config.validate();
        return new HikariDataSource(config);
    }

 

Edited by deeman1337

  • 2 weeks later...

Create an account or sign in to comment