ClickHouse / examples

ClickHouse Examples
Apache License 2.0
92 stars 21 forks source link

Provide an example with Clickhouse username/password #170

Open kumarshantanu opened 3 weeks ago

kumarshantanu commented 3 weeks ago

Please provide a simple docker-compose example where one can

Currently, I am able to spin up the server using docker compose up but do not know how to configure database name, username, password. Even editing users.xml and re-running docker compose up does not help.

kumarshantanu commented 3 weeks ago

After some hit and trial, I am able to connect to a local DB instance (recipe ch-1S_1K_IMDB_dataset) using DbVisualizer using the config below:

Database name: default Username: demouser (yes, the XML tag is the username) Password: secret (the text between the password XML tag) Filename: docker-compose-recipes/recipes/ch-1S_1K_IMDB_dataset/fs/volumes/clickhouse/etc/clickhouse-server/users.d/users.xml Replace the <default>...</default> snippet under <users> with the following:

      <demouser>
        <profile>default</profile>
        <networks>
          <ip>::/0</ip>
        </networks>
        <password>secret</password>
        <quota>default</quota>
      </demouser>