Skip to content
Dymini Panel
v0.18.1
Menu
You are reading the docs of v0.18.1.Go to the latest version

Databases

On this page

Dymini Panel runs one-click Postgres, MySQL, MariaDB, MongoDB and Redis services. Each database service has a Database section in the web dashboard and a database screen in the iOS app, and AI agents control the same features over MCP. Postgres, MySQL, MariaDB and Redis are supported by the console; MongoDB has the terminal.

Everything runs through the database's own client (psql, mysql/mariadb, redis-cli) inside its container, so it works on remote servers too and no database port has to be published. Passwords stay in the panel; they never appear in requests, responses, logs or the audit log.

Health and charts

Database → Health shows the headline numbers (connections, cache hit ratio, size or memory, uptime), every counter the engine reports, and charts over 15 minutes to 30 days. The panel samples each running database every 30 seconds and stores these metrics:

Metric Meaning
db_connections, db_active_connections Open and busy connections
db_ops_per_sec Transactions (Postgres), queries (MySQL) or commands (Redis) per second
db_reads_per_sec, db_writes_per_sec Rows read and rows written per second (SQL engines)
db_cache_hit_ratio Shared buffers, buffer pool or keyspace hit ratio, 0 to 1
db_size_bytes, db_memory_bytes Database size (SQL) or memory used (Redis)
db_keys, db_blocked_clients Redis keys and blocked clients
db_longest_query_secs, db_waiting_locks Longest running statement and waiting locks (Postgres)

GET /api/v1/services/{id}/db/overview returns the current numbers and, in chart_metrics, the metric names that apply to the engine. Pass them to GET /api/v1/metrics?service_id={id}&metrics=…&range=1h (at most 8 per call).

Console

Database → Console runs SQL or Redis commands.

  • Run read accepts one read statement (SELECT, WITH, SHOW, EXPLAIN, VALUES, TABLE, DESCRIBE) or one read Redis command (GET, HGETALL, SCAN, INFO, SLOWLOG GET, …). SQL reads run in a read-only session, so a read can never change data, and stop after the row limit. Functions with side effects (pg_terminate_backend, set_config, …) and password hash catalogs are refused.
  • Explain and Explain analyze show the query plan; analyze runs the statement and is only allowed for reads.
  • Apply changes (administrators) runs one or more statements separated by ;. They run in one transaction when the engine allows it, so a failing statement rolls everything back; the result says transactional. Postgres statements that cannot run in a transaction (VACUUM, CREATE INDEX CONCURRENTLY, CREATE DATABASE, ALTER SYSTEM) and scripts that contain BEGIN/COMMIT run one by one, as do MySQL scripts with DDL (which commits implicitly). On failure the error says which statement failed and whether earlier ones were applied.
  • Destructive statements — DROP, TRUNCATE, ALTER … DROP, DELETE or UPDATE without WHERE, FLUSHDB, FLUSHALL, SCRIPT FLUSH, FUNCTION FLUSH/DELETE — are not run until you confirm them. Over the API the first call returns 409 confirmation_required and nothing runs; send the same request again with confirm_destructive: true.
  • Always refused: client commands (\d, \!, \copy, SOURCE, SYSTEM, PAGER, DELIMITER, USE), COPY, LOAD DATA, INTO OUTFILE, LOAD_FILE, server file functions (pg_read_file, lo_export, …), ALTER SYSTEM for *_command and library settings, and Redis MONITOR, SUBSCRIBE, KEYS, blocking pops, SELECT, MULTI, SHUTDOWN, DEBUG, REPLICAOF, MODULE LOAD, CONFIG SET dir or requirepass, and ACL changes. Each refusal explains what to use instead (for example SCAN instead of KEYS, the db field instead of SELECT).

Rows per query (default 500, at most 5000) and the statement timeout (default 30 seconds, at most 300) are set per database under Agent access; requests may ask for less, never more. Every change is recorded in the audit log with literals hidden.

Data

Database → Data lists tables and views with row estimates and sizes. Open a table to see its columns, its indexes (definition, size, scans) and its rows, page by page and sorted by any column. For Redis it is a key browser: keys are scanned with SCAN in steps (so a large keyspace never blocks Redis), filtered by pattern, type and database number, with type, TTL and memory per key; open a key to see its value (the first 64 KiB of a string, or the first elements of a list, set, hash, sorted set or stream).

Insights

Database → Insights checks the database and lists findings, critical first, each with a suggested statement or command. Suggestions never run by themselves: review them and use Open in console.

  • Postgres: tables read mostly by sequential scans, unused, duplicate and invalid indexes, foreign keys without an index, tables without a primary key, dead rows that need VACUUM, tables never analyzed, long-running and idle-in-transaction sessions, blocked sessions, low cache hit ratio, connections near the limit, deadlocks, temporary files, and the slowest statements when pg_stat_statements is installed.
  • MySQL and MariaDB: tables without a primary key, fragmented tables, long-running threads, unused and redundant indexes (after one day of uptime), queries that scan without an index, low buffer pool hit ratio, connections near the limit, temporary tables on disk, slow query log and performance_schema off, and the slowest statement digests.
  • Redis: no memory limit, memory near the limit, evictions, fragmentation and swapping, failed snapshots or append-only writes, rejected connections, keys without TTL, low hit ratio, and the slow log.

Sessions

Database → Sessions lists connected clients with state, duration, current query and blocking sessions, refreshed every 5 seconds. Administrators can cancel a session's statement or close the session (pg_cancel_backend/pg_terminate_backend, KILL QUERY/KILL, CLIENT KILL).

Agent access

AI agents connected over MCP and the iOS app sign in with an agent grant. Besides their approved scopes (databases:read, databases:write), each database has an agent access setting:

Setting Agents and the iOS app can
Off Read health numbers only
Read (default) Browse tables, rows and keys, run read queries and plans, read insights and sessions
Read and write Also apply changes, run Redis writes, and cancel or close sessions

Destructive statements still need confirm_destructive at every level. People signed in to the panel follow their role instead (writes need an administrator). An agent can lower the setting but never raise it; raise it from the web dashboard. Changes are audited.

API

All endpoints live under /api/v1/services/{id}/db and have the databases tag:

Endpoint Scope Purpose
GET settings, PUT settings read / write Agent access, rows per query, timeout
GET overview read Numbers and chart metric names
GET insights read Findings and slowest statements
GET tables, GET table?name=&schema= read Schema
GET rows?name=&schema=&limit=&offset=&order_by=&order= read Rows
POST query, POST explain read One read-only statement, or its plan
POST execute write Changes
POST redis/query, POST redis/execute read / write Redis commands (args or command, db)
GET keys?pattern=&cursor=&count=&type=&db=, GET key?key=&db=&limit= read Redis keys
GET activity, POST activity/{session}/cancel read / write Sessions

POST query, POST explain and POST redis/query only read, so they need databases:read even though they are POST requests.

Edit this page on GitHub