Docs / Getting Started
Getting Started with Maree-DB
This guide takes you from download to your first SQL query in under 5 minutes. No prior knowledge of Maree-DB is required.
Step 1 - Download and Install
The fastest way to install Maree-DB is with the one-line installer:
curl -sSL https://dist.mareedb.com/install.sh | bash
The installer will:
- Detect your platform (Linux x86_64, Linux ARM64, macOS Apple Silicon, or macOS Intel)
- Download the appropriate binary from dist.mareedb.com
- Verify the integrity of the download
- Install
maree-db-server and maree-db-cli to /usr/local/bin/
For manual installation or other platforms, see the Installation Guide.
Step 2 - Start the Server
maree-db-server start
maree-db-server start --data-dir /var/lib/mareedb
maree-db-server start --foreground
On first start, Maree-DB will:
- Run a boot-time health check (takes ~30 seconds)
- Create the default data directory (
/var/lib/mareedb on Linux)
- Start listening on all four wire protocol ports
- Generate a self-signed TLS certificate (replace with your own for production)
Step 3 - Connect
Maree-DB listens on four wire-protocol ports simultaneously (a fifth, SQL Server TDS, is in final development). Connect with any client you already have:
mysql -h localhost -P 3306 -u admin -p
psql -h localhost -p 5432 -U admin
redis-cli -p 6379
curl http://localhost:8080/health
Default admin password on first start: mareedb_admin - change this immediately in production.
Step 4 - Create Your First Table
Connect with the MySQL client and run some SQL:
CREATE TABLE users (
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO users (name, email)
VALUES ('Alice', 'alice@example.com'),
('Bob', 'bob@example.com');
SELECT * FROM users;
Step 5 - Try Other Data Models
Key-Value (via Redis client):
SET session:abc123 '{"user_id":1,"role":"admin"}'
GET session:abc123
EXPIRE session:abc123 3600
Document store (via SQL):
CREATE TABLE products (
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
data JSONB NOT NULL
);
INSERT INTO products (data)
VALUES ('{"name":"Widget","price":9.99,"tags":["sale","new"]}');
SELECT data->>'name', data->>'price'
FROM products
WHERE data @> '{"tags":["sale"]}';
Step 6 - Run the Health Check
maree-db-server verify --all
maree-db-server verify --all --format json --output results.json
maree-db-server verify --storage --sql --security
Next Steps