Databases
The Databases section of a server (/servers/:id/databases) manages every
database engine on that box from one page — create databases and users, browse
them in a web admin tool with no password to type, and enable vector search for
AI workloads. The page is adaptive: it shows only the engines that are actually
installed. MariaDB/MySQL ships on all plans; PostgreSQL and
pgvector are free add-ons; MongoDB and the pgAdmin/mongo-express admin
tools are Pro.
Create a database, step by step
Section titled “Create a database, step by step”- Make sure you’re on the Databases tab (the toolbar toggles between Databases and Users), then click Create database.
- Pick the engine — MariaDB, PostgreSQL or MongoDB (only installed engines appear).
- Enter a name. The form validates it against each engine’s rules as you
type (Postgres folds to lowercase and wants a leading letter; MariaDB allows a
leading letter or
_), so you fail in the form, not with a server error. - Optionally create a user alongside it. For MariaDB you can set the password; PostgreSQL and MongoDB auto-generate the account password (their CLI takes no password argument).
- Save. The database appears as a card with its size, table/collection count and linked user.
Charset and collation use sensible international defaults (utf8mb4 /
utf8mb4_unicode_ci for MariaDB, UTF8 for Postgres) — applied silently so you
never have to think about them.
What else you can do
Section titled “What else you can do”The page is a searchable, filterable grid of database cards (and a Users tab for accounts). Per card and per tab you can:
- Open a web admin tool — click Open on a card to launch phpMyAdmin (MariaDB), pgAdmin (PostgreSQL) or mongo-express (MongoDB). MZPanel mints a single-use, time-limited magic-login link and drops you straight in, already authenticated — no password to remember.
- View details — open a card’s detail drawer for tables/collections, charset and collation, server version, and an Optimize (MariaDB) / Vacuum (Postgres) / Compact (Mongo) reclaim action.
- Back up & restore — export a database to a native dump (
mysqldumpwith optional gzip) and import a file straight back into the target, or fetch a dump from a URL. Big transfers go browser ↔ VPS directly, bypassing the size cap and PHP timeouts of the web tools. - Manage users — switch to the Users tab to create MariaDB accounts, set or reset passwords, and grant/revoke access to specific databases. A user card links back to the databases it can reach.
- Filter and search — the engine filter appears only when two or more engines hold data; search matches database or user names.
- Enable pgvector — on a PostgreSQL database, flip on the
vectorextension inline for AI/RAG (see below). - Engine settings — the gear button opens per-engine Settings: status, performance tuning (MariaDB buffer pool / max connections), and remote access (bind local vs. remote, port, and a Postgres IP allowlist).
Vector search for AI
Section titled “Vector search for AI”For RAG and other AI workloads you have two paths:
- pgvector — enable the
vectorextension on an existing PostgreSQL database right from its card. This reuses your Postgres instance, so there’s no extra service to run. It’s a free add-on (it just needs PostgreSQL installed). - Qdrant — for a purpose-built vector store, deploy Qdrant from the Marketplace as a managed Docker app. Choose pgvector when you already run Postgres and want vectors next to relational data; choose Qdrant when you want a dedicated vector engine.
How it works
Section titled “How it works”Every action dispatches a job to the server’s agent, which runs it natively and streams the result back. The engines map to three job families:
| Area | Job kinds | Agent runs |
|---|---|---|
| MariaDB/MySQL | db.list, db.create, db.drop, db.user-*, db.export, db.import, db.optimize | mz db … (native mysql/mysqldump) |
| PostgreSQL | pg.db-list, pg.db-create, pg.db-drop, pg.detail, pg.vacuum, pg.vector-* | mz pg … (native psql) |
| MongoDB | mongo.db-list, mongo.db-create, mongo.db-drop, mongo.collections, mongo.compact, mongo.export/import | mz mongo … |
The database and user lists render from the agent-pushed inventory cache, so
the page loads instantly and even an offline box shows its last-known real
databases (never mock rows). Live actions — create, drop, export/import, opening
an admin tool — need the agent online. Which engines are “installed” is read from
the same cache (the extensions snapshot), so the page never fires a live query
against an engine that isn’t there.
The web admin tools are served over the agent’s existing WebSocket, so the app
listens on localhost on the box and you stay on an mzpanel.com host the whole
time — the box’s IP is never exposed in your browser.
CLI & automation
Section titled “CLI & automation”Every action here maps to an mz command on the box — the same engine the
dashboard drives. SSH in and run them directly, or let an on-box AI (ClaudeCode)
run them:
mz db list --json # every database on the boxmz db create appdb --user appuser --pass '…' --jsonmz db export appdb --gzip --json # native mysqldumpmz db import appdb --file /path/dump.sql --jsonmz db pma example.com --json # per-site phpMyAdmin magic linkmz pg db list --json # PostgreSQL databasesmz mongo db list --json # MongoDB databasesAlways pass a sub-action and --json for machine output. See
The mz CLI and the
command catalog.
Gotchas & troubleshooting
Section titled “Gotchas & troubleshooting”- Import overwrites the target. Importing a dump replaces the target database’s contents. Take a backup first.
- User management is MariaDB-only. The Users tab and its grant/revoke
flow apply to MariaDB accounts. PostgreSQL and MongoDB manage their own users;
their
Create databasestep auto-generates the account. - Opening a tool needs the agent online. phpMyAdmin, pgAdmin and mongo-express all require a live agent to mint the magic link — an offline server shows an inline notice instead. If your browser blocks the popup, the page falls back to a clickable single-use link.
- Admin tools must be installed. phpMyAdmin ships free; pgAdmin and mongo-express are Pro and follow their engines — install them from Extensions if the Open button reports the tool isn’t present.
- Databases aren’t public by default. Engines bind to localhost. To reach one from an external client, use the engine Settings → remote access (Postgres gates on a tight IP allowlist).
Related
Section titled “Related”- Cron jobs — scheduled tasks on the same server.
- Backups — protect a database before an import or drop.
- Marketplace — install PostgreSQL, MongoDB, admin tools or Qdrant.
- The mz CLI — driving the box from the command line.