Databases and services
Databases, Redis and RabbitMQ
PostgreSQL (with pgvector), MySQL, MariaDB, SQL Server, Redis and RabbitMQ — creating them, linking them to apps, browsing them, moving data in and out, and backups.
Which one to choose
| Engine | When | Keep in mind |
|---|---|---|
| PostgreSQL | The best default for new projects — Django, Prisma, Rails-style apps | pgvector adds AI search (embeddings) |
| MySQL 8.4 | Apps that want MySQL | — |
| MariaDB | Laravel, WordPress, older PHP sites | Almost fully compatible with MySQL |
| SQL Server 2025 | ASP.NET Core / EF Core, existing .bak files | Reachable from SSMS; on the Express edition one database holds up to 50 GB |
| Redis 7.4 | Cache, sessions, queues (BullMQ, Celery, Laravel queues) | Not a database — a service next to the app |
| RabbitMQ 4.1 | Message queues, sharing work between apps | A service next to the app |
Creating a database
Tick It needs a database when making a new app. To change the engine, name or size, open Advanced → Database engine.
Meghly creates the database on the app's server, with your account's own prefix — you see no one else's databases, and no one sees yours.
Two logins
| Login | Used by | Rights |
|---|---|---|
| runtime | the running app | read, write, run stored procedures — not create or change tables |
| migration | the release, before every deploy | the database's owner: create, change, drop tables |
So code that changes the schema as the app starts (Database.Migrate(), EnsureCreated(), sequelize.sync()) will not work — that is the release's job (How apps run). WordPress is the only exception.
What the app gets
| Variable | What |
|---|---|
DATABASE_URL | the full connection URL |
DB_CONNECTION | pgsql, mysql or sqlsrv |
DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD | the parts one by one |
ConnectionStrings__Default | the connection string for .NET |
In the panel, Databases → choose the database → .NET connection string, DATABASE_URL or Laravel .env — ready to copy.
The same database in another app
Should a worker or a second service use the same database? On the app's Databases tab, Use this database in another app — choose the other app and a variable name; the connection is saved there as a secret.
Browsing a database
Databases → the database → Open database manager. A browser-based tool opens — browse tables, change data, run SQL, export. The panel shows its address, username and password (showing them is written to the audit log). After an hour with nothing done, the tool stops by itself.
SQL Server: connecting with SSMS
SQL Server's port is closed to the internet by default. Remote Access → আমার IP যোগ করো (add my IP), or type IPs / networks and Save allowlist, and SSMS or Azure Data Studio can connect from those IPs only. Details: ASP.NET Core and SQL Server.
PostgreSQL, MySQL and MariaDB stay on the apps' internal network — to work on them from outside, use Open database manager.
Size
Size and Quota → Max size (MB) → Save quota. The total has to fit your plan. Near the limit (80%, 95%) the panel warns; at the limit the database stops accepting new data.
Moving data in and out
| Engine | In | Out |
|---|---|---|
| PostgreSQL, MySQL, MariaDB | Import SQL dump — a .sql file | Download export — a SQL dump |
| SQL Server | Import .bak file — a .bak backup | Download export — a verified .bak |
Taking a dump on the old server:
mysqldump --single-transaction --routines --triggers --no-tablespaces mydb > mydb.sqlpg_dump --no-owner --no-privileges mydb > mydb.sqlThe import runs with the migration login, inside your database. A dump naming another database (USE other_db, CREATE DATABASE) will not work.
A .bak import restores over your database — the data in it now is lost.
PostgreSQL: AI search (pgvector)
Turn on vector search on a PostgreSQL database turns on pgvector — store embeddings and search by meaning (once on, it stays on):
CREATE TABLE items (id bigserial PRIMARY KEY, body text, embedding vector(1536));
SELECT id, body FROM items ORDER BY embedding <=> $1 LIMIT 5;Redis
In the Managed Redis part of the Databases page:
- App — which app it is for (one Redis per app, on that app's private network only).
- Memory (MB) and Persistent data (MB) — data is also written to disk (AOF), so it survives restarts.
- Maxmemory policy —
allkeys-lrufor a cache (old keys make room),noevictionfor queues (nothing is dropped).
The app gets REDIS_URL, REDIS_HOST, REDIS_PORT, REDIS_USERNAME, REDIS_PASSWORD. When an app is removed, its Redis data is kept for a while.
RabbitMQ
The app's General → RabbitMQ → Create RabbitMQ. It is the app's private message broker; every app in the same Service group can use it. The apps get RABBITMQ_URL, RABBITMQ_HOST, RABBITMQ_PORT, RABBITMQ_USER, RABBITMQ_PASSWORD and RABBITMQ_VHOST.
Backups
Database and volume backups are kept off the server, encrypted. On the Backups page:
- Choose a Target, take a backup now or turn on a daily schedule; Retention days — how long they are kept (by plan).
- Restore or download any backup from Backup history.
A restore replaces live data, so the panel asks you to confirm first. An app rollback does not roll back the database — to take the database back, restore it from a backup.