Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an example with Clickhouse username/password #170

Open
kumarshantanu opened this issue Jun 27, 2024 · 1 comment
Open

Provide an example with Clickhouse username/password #170

kumarshantanu opened this issue Jun 27, 2024 · 1 comment

Comments

@kumarshantanu
Copy link

Please provide a simple docker-compose example where one can

  • Spin up a Clickhouse server locally
  • Database should be accessible using database name, username, password
  • User should be able to connect to it using a general-purpose database client, e.g. DBeaver or DbVisualizer

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
Copy link
Author

kumarshantanu commented Jun 27, 2024

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant