I am unable to start the Clickhouse-local with --config-file option , However clickhouse-server is running with same configuration xml files.

I am getting below error :
<img width="1247" alt="image" src="https://user-images.githubusercontent.com/86018844/179818457-c75ab326-7169-4f4e-9cbb-3aa3b08c77e8.png">

After debugging , It seems that Clickhouse-local is searching for "<users_config>" in config() and if not , setting the user_config_path to config.xml. Since config.xml doesn't have any user related storage info, throwing error.
https://github.com/ClickHouse/ClickHouse/blob/master/programs/local/LocalServer.cpp#L328

Adding <users_config> in config.xml loaded the user configuration successfully , However it fails with default database exists error. Since Clickhouse-local already creates default database as part of DatabaseMemory and try to create database again here.
https://github.com/ClickHouse/ClickHouse/blob/master/src/Interpreters/loadMetadata.cpp#L89
<img width="1247" alt="image" src="https://user-images.githubusercontent.com/86018844/179818409-8e72eea4-ed19-4187-b0a6-45a014e2e7a5.png">


PS: , In clickhouse-server, CH automatically searches for user.xml in same path as in config.xml. There is no constraint with <users_config> tag .
enable_objects_loader = true;
        LOG_DEBUG(log, "Loaded user defined objects.");
        LOG_DEBUG(log, "Loading metadata from {}", path);
        loadMetadataSystem(global_context);
        attachSystemTablesLocal(global_context, *createMemoryDatabaseIfNotExists(global_context, DatabaseCatalog::SYSTEM_DATABASE));
        attachInformationSchema(global_context, *createMemoryDatabaseIfNotExists(global_context, DatabaseCatalog::INFORMATION_SCHEMA));
        attachInformationSchema(global_context, *createMemoryDatabaseIfNotExists(global_context, DatabaseCatalog::INFORMATION_SCHEMA_UPPERCASE));
        loadMetadata(global_context);
        startupSystemTables();
        DatabaseCatalog::instance().loadDatabases();
        LOG_DEBUG(log, "Loaded metadata.");
    }
    else if (!config().has("no-system-tables"))
    {
        attachSystemTablesLocal(global_context, *createMemoryDatabaseIfNotExists(global_context, DatabaseCatalog::SYSTEM_DATABASE));
        attachInformationSchema(global_context, *createMemoryDatabaseIfNotExists(global_context, DatabaseCatalog::INFORMATION_SCHEMA));
        attachInformationSchema(global_context, *createMemoryDatabaseIfNotExists(global_context, DatabaseCatalog::INFORMATION_SCHEMA_UPPERCASE));
    }
    
    UserDefinedSQLObjectsLoader::instance().enable(enable_objects_loader);
    server_display_name = config().getString("display_name", getFQDNOrHostName());
    prompt_by_server_display_name = config().getRawString("prompt_by_server_display_name.default", "{display_name} :) ");
    std::map<String, String> prompt_substitutions{{"display_name", server_display_name}};
    for (const auto & [key, value] : prompt_substitutions)
        boost::replace_all(prompt_by_server_display_name, "{" + key + "}", value);
    ClientInfo & client_info = global_context->getClientInfo();
    client_info.setInitialQuery();
    client_info.query_kind = query_kind;
}
[[ maybe_unused ]] static std::string getHelpHeader()