Getting Started
This page shows you how to get started with HoraeDB quickly. You’ll start a standalone HoraeDB server, and then insert and read some sample data using SQL.
Start server
HoraeDB docker image is the easiest way to get started, if you haven’t installed Docker, go there to install it first.
Note: please choose tag version >= v1.0.0, others are mainly for testing.
You can use command below to start a standalone server
|
|
HoraeDB will listen three ports when start:
- 8831, gRPC port
- 3307, MySQL port
- 5440, HTTP port
The easiest to use is HTTP, so sections below will use it for demo. For production environments, gRPC/MySQL are recommended.
Customize docker configuration
Refer the command as below, you can customize the configuration of horaedb-server in docker, and mount the data directory /data
to the hard disk of the docker host machine.
wget -c https://raw.githubusercontent.com/apache/incubator-horaedb/main/docs/minimal.toml -O horaedb.toml
sed -i 's/\/tmp\/horaedb/\/data/g' horaedb.toml
docker run -d --name horaedb-server \
-p 8831:8831 \
-p 3307:3307 \
-p 5440:5440 \
-v ./horaedb.toml:/etc/horaedb/horaedb.toml \
-v ./data:/data \
ghcr.io/apache/horaedb-server:nightly-20231222-f57b3827
Write and read data
Create table
|
|
Write data
|
|
Read data
|
|
Show create table
|
|
Drop table
|
|
Using the SDKs
See sdk.
Next Step
Congrats, you have finished this tutorial. For more information about HoraeDB, see the following: