public static void createStroomDatabaseAndUser(final Connection connection,
                                                   final String dbName,
                                                   final String username,
                                                   final String password) throws SQLException {
        try (final Statement statement = connection.createStatement()) {
            LOGGER.debug("Creating database '{}'", dbName);
            statement.executeUpdate("CREATE DATABASE `" + dbName +
                                    "` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;");

            LOGGER.debug("Creating DB user '{}'", username);
            statement.executeUpdate("CREATE USER IF NOT EXISTS '" +
                                    username + "'@'%' IDENTIFIED BY '" +
                                    password + "';");

            LOGGER.debug("Granting privileges to user '{}'", username);
            statement.executeUpdate("GRANT ALL PRIVILEGES ON *.* TO '" +
                                    username + "'@'%' WITH GRANT OPTION;");
        }
    }
@param dbConfig         The config to use
@param name             The name of the datasource, i.e. the module name
@param unique           True if we want our own dedicated connection pool
@param isSharedDatabase True if we want to re-use the DB between tests. We normally do
                        to save on the cost of running migrations, but not for
                        migration tests as for those we want a blank db.
stroom-test-common/src/main/java/stroom/test/common/util/db/DbTestUtil.java