MariaDB Overview
Fully managed MariaDB databases with Galera Cluster for high availability, automated backups, and easy scaling.
What is SailOps MariaDB?
SailOps provides fully managed MariaDB databases that take care of the operational complexity:
- Galera Cluster for synchronous multi-master replication
- Automated backups with on-demand and scheduled backups
- High availability with automatic failover
- Automatic updates and security patches
- Monitoring and alerting built-in
- Easy scaling without downtime
Supported Versions
| Version | Status | Best For |
|---|---|---|
| MariaDB 11.4 LTS | Current | Production workloads, new projects |
MariaDB 11.4 LTS is the recommended version for all production workloads. It provides long-term support and the latest features.
Key Features
Galera Cluster (High Availability)
MariaDB on SailOps uses Galera Cluster for true multi-master replication:
- Synchronous replication - All nodes are always in sync
- Multi-master - Read and write on any node
- Automatic failover - No single point of failure
- Automatic node recovery - Failed nodes rejoin automatically
- Configurable replicas - 1, 3, or 5 nodes (odd numbers recommended)
Automated Backups
- Daily automated backups (when enabled)
- On-demand backups via UI or API
- Configurable backup schedule (cron expressions)
- S3-compatible storage
- Retention based on your support plan (7 days default)
- One-click restore
Security
- Encrypted at rest by the hosting infrastructure
- Encrypted in transit (TLS)
- Network isolation per project
- Automatic security updates
- User and database management with granular privileges
Monitoring
- Real-time metrics (CPU, memory, connections)
- Query performance insights
- Automated alerts
- Log access
Compute Classes
Database compute classes define the performance tier and resource allocation.
| Class | Description | Best For |
|---|---|---|
| Eco | Shared resources, cost-effective | Development, testing, budget-conscious workloads |
| Standard | Balanced performance | General production databases |
| Production | Dedicated resources | Sensitive workloads requiring guaranteed performance |
- Start with Eco for development and testing
- Use Standard for most production databases
- Choose Production when you need dedicated performance guarantees for critical data
Database Flavors
Within each compute class, choose a flavor that defines CPU and memory allocation:
| Flavor | Description | Best For |
|---|---|---|
| Small | Entry-level resources | Development, small apps |
| Medium | Balanced resources | Standard production |
| Large | Higher resources | High-traffic applications |
| XLarge | Maximum resources | Enterprise workloads |
The exact CPU and memory values depend on the selected compute class. Pricing is displayed when selecting a flavor.
Storage Classes
Choose the storage class based on your I/O requirements:
| Class | Max IOPS | Best For |
|---|---|---|
| standard | 5,000 | General workloads, development |
| performance | 15,000 | High I/O, OLTP, analytics |
Storage can be increased at any time without downtime. All storage uses NVMe SSDs.
High Availability with Galera
Enable Galera for production-grade high availability:
| Configuration | Nodes | Best For |
|---|---|---|
| Standalone | 1 | Development, testing |
| Galera (3 nodes) | 3 | Production (recommended) |
| Galera (5 nodes) | 5 | High-demand production |
With Galera enabled, your database runs on multiple nodes with synchronous replication. All nodes can accept reads and writes, providing both high availability and load distribution.
Connection Details
After creating a database, you'll receive connection details using short service names (resolvable within the same project namespace):
| Field | Example |
|---|---|
| Host (primary) | my-mariadb-primary |
| Host (read) | my-mariadb |
| Port | 3306 |
| Database | mydb |
| Username | app_user |
| Password | Auto-generated or user-defined |
Connection String
mysql://app_user:PASSWORD@my-mariadb-primary:3306/mydb
You can find the full connection string in the database Overview tab under "Connection Information".
MariaDB databases expose two endpoints:
- Primary:
my-mariadb-primary:3306— use for writes - Read:
my-mariadb:3306— use for reads (load-balanced across Galera nodes)
Endpoints include the port number and use short service names without the namespace suffix.
Internal Access (Default)
By default, databases are only accessible from within your project via internal DNS.
Public Access (Optional)
You can enable public access to connect from external applications:
- Go to your database settings
- Enable Public Access
- Configure the IP Allowlist — add each allowed CIDR and an optional note (up to 100 characters) to identify its purpose
When enabled:
- A dedicated gateway is created for your database
- Port 3306 is exposed with TLS encryption
- Only IPs in your allowlist can connect
Always use IP allowlisting when enabling public access. Never expose your database without restrictions.
Services that depend on an instance
Some services store their data in a MariaDB instance of the project. Such a service gets its own schema and user on the MariaDB instance. These items appear in the Databases & Users tab with a read-only badge naming the service that manages them. You cannot delete a dependency-managed schema or user, or reset its password — make changes through the service that owns them instead. The MariaDB instance cannot be deleted while one of them exists.
Quick Start
Create a Database
- Go to Services in the sidebar
- Click Create Service and select MariaDB
- Enter a name for your database cluster
- Select compute class and flavor
- Configure storage size and class
- Enable Galera for high availability (recommended for production)
- Add at least one database and one user
- Click Create
Your database is ready in about 60 seconds (longer for Galera clusters).
Database Detail Tabs
Once created, your MariaDB database detail view has the following tabs:
| Tab | Description |
|---|---|
| Overview | Status, connection information, configuration summary |
| Databases & Users | Create and manage additional databases and users |
| Backups | View backup history, trigger manual backups, restore from backup |
| Observability | CPU, memory, storage, and connection metrics |
| Logs | Real-time and historical database logs |
Connect from a Container
// Node.js example with mysql2
const mysql = require('mysql2/promise');
const connection = await mysql.createConnection({
host: 'my-mariadb-primary',
user: 'app_user',
password: process.env.DB_PASSWORD,
database: 'mydb'
});
const [rows] = await connection.execute('SELECT NOW()');
console.log(rows[0]);
# Python example with mysql-connector
import mysql.connector
import os
conn = mysql.connector.connect(
host="my-mariadb-primary",
user="app_user",
password=os.environ["DB_PASSWORD"],
database="mydb"
)
cursor = conn.cursor()
cursor.execute("SELECT NOW()")
print(cursor.fetchone())
Database Architecture
Standalone Mode
Galera Cluster Mode
User and Database Management
You can create multiple users and databases within a single MariaDB instance.
Create a Database
When creating or updating your MariaDB cluster:
- Navigate to the Services section
- Add a new database with:
- Name: Database name (e.g.,
myapp_prod) - Character Set: Default
utf8mb4 - Collation: Default
utf8mb4_unicode_ci
- Name: Database name (e.g.,
Create a User
When creating or updating your MariaDB cluster:
- Navigate to the Users section
- Add a new user with:
- Username: User identifier
- Password: Secure password (min 8 characters)
- Database Access: Select databases and privileges
User Privileges
Available privileges for database access:
| Privilege | Description |
|---|---|
ALL | All privileges |
SELECT | Read data |
INSERT | Insert data |
UPDATE | Update data |
DELETE | Delete data |
CREATE | Create tables |
DROP | Drop tables |
INDEX | Manage indexes |
ALTER | Alter table structure |
Backups
Automated Backups
Configure automated backups when creating or updating your database:
- Enable: Toggle automatic backups on/off
- Schedule: Cron expression (default:
0 2 * * *- daily at 2 AM) - Retention: Based on your support plan (7 days default, contact support for extended options)
- Storage: S3 or PVC
On-Demand Backups
Create instant backups anytime:
- Go to your database
- Navigate to the Backups tab
- Click Create Backup
- Wait for the backup to complete
Restore from Backup
- Go to the Backups tab
- Find the backup you want to restore
- Click Restore
- Confirm the restore operation
Restoring from a backup will overwrite the current database data. This operation cannot be undone.
Download Backup
You can download backups for offline storage:
- Go to the Backups tab
- Click the download icon on the backup
- A presigned URL will be generated for secure download
Pricing
Databases are billed per-hour based on compute class, flavor, and storage:
| Component | Pricing |
|---|---|
| Compute | Per flavor (displayed when selecting) |
| Storage | €0.1234/GiB/month (standard) or €0.168/GiB/month (performance) |
| Backups | €0.07/GiB/month of backup storage, from the first byte |
With Galera enabled, compute costs are multiplied by the number of nodes. For example, a 3-node cluster costs 3x the single-node price.