MariaDB
Stackpad provides managed MariaDB databases as project services. MariaDB is a MySQL-compatible relational database that works with any MySQL client or ORM.
Creating a MariaDB service
- Open your project in the dashboard
- Click Add Service → Database
- Select MariaDB
- Click Create
Stackpad provisions a MariaDB instance with:
- Auto-generated credentials encrypted with AES-256-GCM
- Persistent storage that survives container restarts
- Private network access at
mariadb:3306
Connecting from your application
Stackpad injects the MYSQL_URL environment variable into your web services:
mysql://stackpad_user:auto_generated_pass@mariadb:3306/stackpad_db// Using mysql2import mysql from 'mysql2/promise';
const connection = await mysql.createConnection(process.env.MYSQL_URL!);Backups
MariaDB databases are backed up using mysqldump with the same schedule as PostgreSQL:
| Plan | Frequency | Retention |
|---|---|---|
| Starter | Daily | 7 days |
| Pro | Every 6 hours | 30 days |
| Business | Hourly | 90 days |
When to choose MariaDB
Choose MariaDB over PostgreSQL when:
- Your application or ORM requires MySQL compatibility
- You’re migrating from an existing MySQL/MariaDB setup
- Your team has more experience with MySQL
For new projects, we generally recommend PostgreSQL for its advanced features, JSON support, and broader ecosystem.
What’s next?
- PostgreSQL — the alternative database option
- Connecting services — how private networking works
- Backups — manage and restore database backups