Supported Databases
Minimal supports heterogeneous database connections within a single instance and a single project.
One Minimal deployment can simultaneously serve MySQL, MariaDB, PostgreSQL, and ClickHouse databases — different types, different hosts, different schemas — all through the same API. You do not need to deploy a separate Minimal instance per database type or per team.
A single Minimal instance has been tested with 1,000 databases registered under one project successfully.
Supported Types
| Database | db_type slug | Default Port | Status |
|---|---|---|---|
| MySQL | ms | 3306 | ✅ Available |
| MariaDB | ma | 3306 | ✅ Available |
| PostgreSQL | pg | 5432 | ✅ Available |
| ClickHouse | ch | 9000 | ✅ Available |
| Oracle | or | 1521 | 🚧 Coming Soon |
| SQL Server | ss | 1433 | 🚧 Coming Soon |
| MongoDB | md | 27017 | 🚧 Coming Soon |
How db_type Appears in the URL
The db_type slug routes the request to the correct database engine:
/minimal/api/rest/auto/v1/{db_type}/{database}/{table}
│
└── ms / ma / pg / ch
MySQL:
GET /minimal/api/rest/auto/v1/ms/sales_db/orders?pg=0&ps=10
MariaDB:
GET /minimal/api/rest/auto/v1/ma/sales_db/orders?pg=0&ps=10
PostgreSQL:
GET /minimal/api/rest/auto/v1/pg/analytics_db/events?pg=0&ps=10
ClickHouse:
GET /minimal/api/rest/auto/v1/ch/events_db/pageviews?pg=0&ps=10
Registering Databases
Database connections are registered at project creation time via the database array in the Create Project request body. This is separate from Minimal's own internal definition_store in config.yml — that is only for Minimal's metadata.
Each entry in the array is one database connection:
{
"name": "My Project",
"abbreviation": "mypj",
"database": [
{
"host_details": [{ "host": "localhost", "port": "3306" }],
"username": "demouser",
"password": "dem****",
"db_name": "demo_db",
"db_type": "ms",
"connect_timeout_secs": 60,
"idle_timeout_secs": 900,
"max_open_connections": 50,
"max_idle_connections": 25
}
]
}
Multiple Databases — Same Type
Connect to multiple MySQL databases in one project:
{
"name": "Multi MySQL Project",
"abbreviation": "mmyp",
"database": [
{
"host_details": [{ "host": "db1.internal", "port": "3306" }],
"username": "user1",
"password": "pa****",
"db_name": "sales_db",
"db_type": "ms",
"connect_timeout_secs": 60,
"idle_timeout_secs": 900,
"max_open_connections": 50,
"max_idle_connections": 25
},
{
"host_details": [{ "host": "db2.internal", "port": "3306" }],
"username": "user2",
"password": "pa****",
"db_name": "inventory_db",
"db_type": "ms",
"connect_timeout_secs": 60,
"idle_timeout_secs": 900,
"max_open_connections": 50,
"max_idle_connections": 25
}
]
}
Both are accessible immediately:
GET /minimal/api/rest/auto/v1/ms/sales_db/orders?pg=0&ps=10
GET /minimal/api/rest/auto/v1/ms/inventory_db/products?pg=0&ps=10
Multiple Databases — Different Types
Connect to MySQL, MariaDB, PostgreSQL, and ClickHouse in the same project under the same Minimal instance:
{
"name": "Heterogeneous Project",
"abbreviation": "hetp",
"database": [
{
"host_details": [{ "host": "mysql.internal", "port": "3306" }],
"username": "mysqluser",
"password": "mys****",
"db_name": "sales_db",
"db_type": "ms",
"connect_timeout_secs": 60,
"idle_timeout_secs": 900,
"max_open_connections": 50,
"max_idle_connections": 25
},
{
"host_details": [{ "host": "maria.internal", "port": "3306" }],
"username": "mariauser",
"password": "mar****",
"db_name": "crm_db",
"db_type": "ma",
"connect_timeout_secs": 60,
"idle_timeout_secs": 900,
"max_open_connections": 50,
"max_idle_connections": 25
},
{
"host_details": [{ "host": "pg.internal", "port": "5432" }],
"username": "pguser",
"password": "pg****",
"db_name": "analytics_db",
"db_type": "pg",
"connect_timeout_secs": 60,
"idle_timeout_secs": 900,
"max_open_connections": 50,
"max_idle_connections": 25
},
{
"host_details": [{ "host": "ch.internal", "port": "9000" }],
"username": "chuser",
"password": "ch****",
"db_name": "events_db",
"db_type": "ch",
"connect_timeout_secs": 60,
"idle_timeout_secs": 900,
"max_open_connections": 50,
"max_idle_connections": 25
}
]
}
All four databases accessible from the same Minimal instance:
GET /minimal/api/rest/auto/v1/ms/sales_db/orders?pg=0&ps=10
GET /minimal/api/rest/auto/v1/ma/crm_db/contacts?pg=0&ps=10
GET /minimal/api/rest/auto/v1/pg/analytics_db/events?pg=0&ps=10
GET /minimal/api/rest/auto/v1/ch/events_db/pageviews?pg=0&ps=10
Connection Pool Settings
These fields apply to every database entry regardless of type:
| Field | Type | Description |
|---|---|---|
connect_timeout_secs | integer | How long to wait when opening a new connection |
idle_timeout_secs | integer | How long an idle connection is kept alive in the pool |
max_open_connections | integer | Maximum concurrent open connections to this database |
max_idle_connections | integer | Maximum idle connections held ready in the pool |
| Setting | Development | Production |
|---|---|---|
max_open_connections | 10 | 50–100 |
max_idle_connections | 5 | 25–50 |
idle_timeout_secs | 300 | 600–900 |
ClickHouse Notes
ClickHouse is optimised for analytical read workloads.
POST, PUT, and DELETE operations may behave differently depending on your table engine.
Use MergeTree or ReplacingMergeTree for best compatibility.
Common Connection Errors
| Code | Cause | Fix |
|---|---|---|
400 Bad Request | Invalid db_type value | Use one of the available slugs: ms, ma, pg, ch |
424 Failed Dependency | Minimal could not reach the database | Verify host, port, credentials and that the database is reachable from the Minimal server |
404 Not Found | db_name or table does not exist | Check spelling of database and table names |
403 Forbidden | Database user lacks privileges | Grant SELECT, INSERT, UPDATE, DELETE on the target database to the configured user |