Run Databend in Docker and query it over the MySQL protocol or the HTTP SQL API.
Databend is a Rust-based OLAP database with a MySQL-compatible endpoint and an HTTP SQL API. This lab starts the standalone image, creates a small table, and shows both connection paths so you can use DBeaver, a MySQL client, or plain curl.
docker compose up -d
curl -sS -X POST http://localhost:8000/v1/query -H 'Content-Type: application/json' -d '{"sql":"SELECT 1 AS ok"}'
# with a MySQL client:
mysql -h 127.0.0.1 -P 3307 -u root < examples/01_schema.sql
mysql -h 127.0.0.1 -P 3307 -u root < examples/02_queries.sql| Field | Value |
|---|---|
| MySQL protocol | mysql -h 127.0.0.1 -P 3307 -u root |
| HTTP SQL API | http://localhost:8000/v1/query |
| User | root |
| Password | (empty in this lab) |
| DBeaver | MySQL driver, host 127.0.0.1, port 3307 |
| File | What it shows |
|---|---|
docker-compose.yml |
Engine, ports, and persistent volume. |
.github/workflows/compose-check.yml |
Validates the Compose file on every push. |
examples/01_schema.sql |
A small events table with Databend types. |
examples/02_queries.sql |
Aggregation and a window function. |
- Query the HTTP API with
curland compare the JSON response with the MySQL client output. - Create a table with a
Variantcolumn and query a nested field. - Load a CSV with
COPY INTOand check the row count. - Connect DBeaver through the MySQL driver and inspect the system tables.
- The standalone image keeps data inside the container; restarting it resets the lab data.
- The MySQL endpoint is on port 3307 to avoid clashing with a local MySQL/MariaDB on 3306.
- The HTTP API may require authentication in newer versions; check the upstream docs if
SELECT 1is rejected. - Pin a release tag instead of
latestif you need reproducible behavior.
This lab publishes its ports on 127.0.0.1 only. To use it from another country, do not open the database port to the internet. Pick one:
- VPS + private tunnel: run the lab on a small Ubuntu VPS, keep the port closed, and connect through WireGuard or
ssh -L. - Managed service: use a managed free tier for this engine and point the same examples at its connection string.
- HTTP UI only: if the engine has a web UI, put it behind Caddy with TLS and basic auth.
The shared checklist, provider map, and commands are in REMOTE-ACCESS.md.
docker compose down -v-v also removes the named volume, so the next start is a clean slate.
Part of the database-labs collection: 26 database engines, one index.
MIT (c) 2026 Arya Fatthurahman. See LICENSE.