```
cat /etc/clickhouse-client/conf.d/propmt.xml
<config>
    <prompt_by_server_display_name>
	    <default>{database}@{host} :) </default>
    </prompt_by_server_display_name>
</config>


cat /etc/clickhouse-server/conf.d/default_database.xml
<?xml version="1.0"?>
<yandex>
    <default_database>dw</default_database>
</yandex>

$ clickhouse-client
ClickHouse client version 21.6.5.37 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 21.6.5 revision 54448.

default@localhost :) select currentDatabase();

SELECT currentDatabase()

Query id: efd2952e-a0d5-4250-be3c-5c3a929d3256

┌─currentDatabase()─┐
│ dw                │
└───────────────────┘
```

now: `default@localhost :)`
expected: `dw@localhost :)`
else
                    global_context->applySettingChange(change);
            }
            global_context->resetSettingsToDefaultValue(set_query->default_settings);
        }
        if (const auto * use_query = parsed_query->as<ASTUseQuery>())
        {
            const String & new_database = use_query->database;
            /// If the client initiates the reconnection, it takes the settings from the config.
            config().setString("database", new_database);
            /// If the connection initiates the reconnection, it uses its variable.
            connection->setDefaultDatabase(new_database);
        }
    }
    /// Always print last block (if it was not printed already)
    if (profile_events.last_block)
    {
        initLogsOutputStream();
        progress_indication.clearProgressOutput();
        logs_out_stream->writeProfileEvents(profile_events.last_block);
        logs_out_stream->flush();
        profile_events.last_block = {};
    }
    if (is_interactive)
    {
        std::cout << std::endl
            << processed_rows << " row" << (processed_rows == 1 ? "" : "s")
            << " in set. Elapsed: " << progress_indication.elapsedSeconds() << " sec. ";
        progress_indication.writeFinalProgress();
        std::cout << std::endl << std::endl;