String password = config.getString("sql.password", "password");
String url = "jdbc:mysql://" + config.getString("sql.host", "localhost") + ":" + config.getString("sql.port", "3306") + "/"
+ config.getString("sql.database", "database") + "?autoReconnect=true";
Connection connect = DriverManager.getConnection(url, config.getString("sql.username", "username"),
config.getString("sql.password", "password"));
con = new SqlConnector(connect, config.getString("sql.prefix", "multiinv_"), url, username, password);
} catch(SQLException ex) {
MultiInv.log.warning("Could not establish connection to the database! User inventories won't be saved!");
}
}