Skip to content

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

  1. Open your project in the dashboard
  2. Click Add Service → Database
  3. Select MariaDB
  4. 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 mysql2
import 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:

PlanFrequencyRetention
StarterDaily7 days
ProEvery 6 hours30 days
BusinessHourly90 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?