Analytical foundations

Run ClickHouse locally

Start a disposable server and client with an official package or container, then keep it bound and removable for the lab.

9 minute lesson

~~~

Use an official package or container to run ClickHouse locally. Connect with clickhouse-client or the local command supported by your installation.

Keep the first server on the development machine. Do not expose an unauthenticated database port to the internet. A ClickHouse Cloud service is another option when you want managed storage and operations.

Run SELECT version(), create a practice database, and record the exact command that stops and removes the local environment.

Run a disposable server and connect with the native client:

docker run --rm -d --name clickhouse \
  -p 8123:8123 -p 9000:9000 clickhouse/clickhouse-server
docker exec -it clickhouse clickhouse-client

Inside the client, run SELECT version() and create a separate practice database. Stop the container when finished. Do not publish the native or HTTP ports on an internet-facing host without authentication and network controls.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →