{"slug":"databases-overview","title":"Databases Overview","description":"DanubeData provides fully managed database instances with MySQL, PostgreSQL, and MariaDB support.","section":"Features","url":"https://docs.danubedata.ro/databases-overview","markdown_url":"https://docs.danubedata.ro/databases-overview.md","breadcrumbs":[{"title":"Features","slug":null},{"title":"Databases","slug":"databases-overview"}],"headings":[{"level":1,"title":"Databases Overview","id":"databases-overview"},{"level":2,"title":"What are Database Instances?","id":"what-are-database-instances"},{"level":2,"title":"Supported Database Engines","id":"supported-database-engines"},{"level":3,"title":"MySQL","id":"mysql"},{"level":3,"title":"PostgreSQL","id":"postgresql"},{"level":3,"title":"MariaDB","id":"mariadb"},{"level":2,"title":"Key Features","id":"key-features"},{"level":3,"title":"📊 Performance Monitoring","id":"performance-monitoring"},{"level":3,"title":"🔒 Security","id":"security"},{"level":3,"title":"💾 Automated Backups","id":"automated-backups"},{"level":3,"title":"📈 Scalability","id":"scalability"},{"level":3,"title":"⚙️ Customization","id":"customization"},{"level":2,"title":"Getting Started","id":"getting-started"},{"level":3,"title":"Create a Database","id":"create-a-database"},{"level":3,"title":"Connect to Your Database","id":"connect-to-your-database"},{"level":2,"title":"Resource Profiles","id":"resource-profiles"},{"level":2,"title":"Read Replicas","id":"read-replicas"},{"level":3,"title":"Benefits","id":"benefits"},{"level":2,"title":"Backups & Recovery","id":"backups-recovery"},{"level":3,"title":"Automated Backups","id":"automated-backups"},{"level":3,"title":"Manual Snapshots","id":"manual-snapshots"},{"level":3,"title":"Restore from Backup","id":"restore-from-backup"},{"level":2,"title":"Parameter Groups","id":"parameter-groups"},{"level":2,"title":"Storage Autoscaling","id":"storage-autoscaling"},{"level":2,"title":"Version Upgrades","id":"version-upgrades"},{"level":2,"title":"SQL Studio","id":"sql-studio"},{"level":2,"title":"High Availability","id":"high-availability"},{"level":2,"title":"Cloning","id":"cloning"},{"level":2,"title":"Monitoring","id":"monitoring"},{"level":3,"title":"Key Metrics","id":"key-metrics"},{"level":3,"title":"Metric Alerts","id":"metric-alerts"},{"level":3,"title":"Health Monitoring","id":"health-monitoring"},{"level":3,"title":"Log Explorer","id":"log-explorer"},{"level":2,"title":"Best Practices","id":"best-practices"},{"level":3,"title":"Performance","id":"performance"},{"level":3,"title":"Security","id":"security"},{"level":3,"title":"Reliability","id":"reliability"},{"level":3,"title":"Cost Optimization","id":"cost-optimization"},{"level":2,"title":"Troubleshooting","id":"troubleshooting"},{"level":3,"title":"High CPU Usage","id":"high-cpu-usage"},{"level":3,"title":"Connection Errors","id":"connection-errors"},{"level":3,"title":"Replication Lag","id":"replication-lag"},{"level":2,"title":"Next Steps","id":"next-steps"}],"format":"markdown","word_count":1663,"content":"# Databases Overview\n\nDanubeData provides fully managed database instances with MySQL, PostgreSQL, and MariaDB support.\n\n## What are Database Instances?\n\nDatabase instances are managed database servers that provide:\n\n- **Automated Setup**: Deploy in minutes\n- **Automated Backups**: Daily backups (managed PostgreSQL adds 30-day continuous backups)\n- **High Availability**: Read replicas and automatic failover\n- **Storage Autoscaling**: Optional automatic disk growth before you run out of space\n- **In-Place Version Upgrades**: Move MySQL and PostgreSQL to a newer engine version without recreating\n- **SQL Studio**: An in-browser data studio included free with every PostgreSQL instance\n- **Monitoring & Alerts**: Real-time metrics with configurable metric alerts and health monitoring\n- **Security**: Firewall integration and encrypted (TLS/SSL) connections\n\n## Supported Database Engines\n\n### MySQL\n- Versions: 8.0, 8.4, 9.0, 9.1\n- Use cases: Web applications, e-commerce, CMS\n- Features: InnoDB storage, full-text search, JSON support\n\n### PostgreSQL\n- Versions: 15, 16, 17, 18\n- Use cases: Analytics, complex queries, GIS applications\n- Features: JSONB, full-text search, one-click PostGIS, connection pooler, SQL Studio\n\n### MariaDB\n- Versions: 10.11, 11.4, 11.6\n- Use cases: Drop-in MySQL replacement\n- Features: Improved performance, better replication\n\n## Key Features\n\n### 📊 Performance Monitoring\n- Real-time CPU, memory, and disk metrics\n- Query performance tracking\n- Connection monitoring\n- Slow query logs\n\n### 🔒 Security\n- Firewall protection\n- Private networking\n- Encrypted connections (TLS/SSL)\n- Encrypted backups\n\n### 💾 Automated Backups\n- Daily automated backups with 3-day retention\n- Managed PostgreSQL adds 30-day continuous backups\n- Point-in-time recovery\n- Manual snapshots\n\n### 📈 Scalability\n- Read replicas for scaling reads\n- Vertical scaling (resize instances)\n- Storage autoscaling (optional automatic disk growth)\n- In-place engine version upgrades (MySQL, PostgreSQL)\n- Connection pooling (built-in pgBouncer proxy for PostgreSQL)\n\n### ⚙️ Customization\n- Custom parameter groups\n- Version selection\n- Storage configuration\n\n## Getting Started\n\n### Create a Database\n\n1. Navigate to **Databases** in the main menu\n2. Click **Create Database Instance**\n3. Select your database engine (MySQL, PostgreSQL, or MariaDB)\n4. Choose a version\n5. Select a resource profile\n6. Configure networking and security\n7. Click **Create Database**\n\nYour database will be ready in 2-3 minutes!\n\n### Connect to Your Database\n\nOnce your database is running, you'll receive:\n- **Hostname**: The connection endpoint\n- **Port**: 3306 for MySQL/MariaDB, 5432 for PostgreSQL on the private network.\n  With public access enabled, the public hostname listens on its own port instead\n  — see below\n- **Database Name**: The ready-to-use database we created for you, shown right in the credentials card\n- **Username**: Database username\n- **Password**: Secure password (shown once)\n\n**Example Connection String:**\n```\nmysql -h your-db-hostname -P 3306 -u admin -p\n```\n\nBy default a database is reachable only from within your private network. To connect from outside DanubeData, enable public access (DNS) on the instance — its firewall opens automatically so external clients can connect right away, and closes again the moment you turn public access back off.\n\n**The public endpoint uses a different port than the private one.** Public\ntraffic arrives through a shared load balancer, where your instance gets its own\ndedicated port — not 3306 or 5432. Those engine ports stay correct for\nprivate-network connections. Always copy the port shown next to the endpoint in\nthe dashboard, or read it from the API:\n\n| Where you connect from | Hostname | Port |\n|---|---|---|\n| Private network (VPS, other DanubeData resources) | short in-cluster name | `port` (3306 / 5432) |\n| Public internet (public access enabled) | public DNS hostname | `dns_port` |\n\nDNS records cannot carry a port number, so resolving the hostname tells you\nnothing about which port to use. API clients should read `connection_host` and\n`connection_port` — they always resolve to the correct pair:\n\n```bash\ncurl -H \"Authorization: Bearer $DANUBEDATA_TOKEN\" \\\n  https://api.danubedata.ro/api/v1/database/$DATABASE_ID/credentials\n```\n\n```json\n{\n  \"host\": \"postgresql-orders.acme.danubedata.ro\",\n  \"port\": 5438,\n  \"username\": \"pguser\",\n  \"database\": \"orders\",\n  \"password\": \"...\",\n  \"connection_info\": \"postgresql://pguser:...@postgresql-orders.acme.danubedata.ro:5438/orders\"\n}\n```\n\nThe read-replica (\"reader\") endpoint is private-network only and always uses the\nengine port, even when public access is enabled.\n\n## Resource Profiles\n\n| Profile | vCPU | RAM | Storage | Monthly |\n|---------|------|-----|---------|---------|\n| Small | 2 | 4 GB | 50 GB | €19.99 |\n| Medium | 4 | 8 GB | 100 GB | €39.99 |\n| Large | 8 | 16 GB | 200 GB | €79.99 |\n\n## Read Replicas\n\nScale read operations by creating replicas:\n\n1. Go to your database instance page\n2. Click **Replicas** tab\n3. Click **Add Replica**\n4. Select a node and resource profile\n5. Click **Create Replica**\n\n### Benefits\n- Offload read queries from primary\n- Runs on a separate host in the same datacenter\n- Automatic synchronization\n- Promote to primary if needed\n\n## Backups & Recovery\n\n### Automated Backups\n- Performed daily automatically\n- 3-day retention\n- No performance impact\n- Stored securely\n\n### Manual Snapshots\n1. Go to your database page\n2. Click **Snapshots** tab\n3. Click **Create Snapshot**\n4. Enter a name\n5. Click **Create**\n\n### Restore from Backup\n1. Navigate to **Snapshots**\n2. Click **Restore** on a snapshot\n3. Choose to restore to existing or new instance\n\n## Parameter Groups\n\nCustomize database configuration:\n\n1. Navigate to **Parameter Groups**\n2. Click **Create Parameter Group**\n3. Select database engine and version\n4. Configure parameters\n5. Attach to your database instance\n\nDefault (system) parameter groups are version-scoped — the dropdown filters to groups that match your instance's engine version. Custom parameter groups remain compatible across versions. See [Parameter Groups](https://docs.danubedata.ro/databases-parameters) for the full reference.\n\n## Storage Autoscaling\n\nTurn on autoscaling for any managed database and its storage grows automatically before it fills up — so a full disk never takes your database offline.\n\n- **Enable anytime**: Switch it on when creating a database, or later from the instance's edit page. It's **off by default** — nothing changes unless you opt in.\n- **Your thresholds**: Set the usage level that triggers growth (default **80% used**) and how much storage to add each time (default **80 GiB**), per instance.\n- **Controlled growth**: A cooldown between scale-events keeps storage from growing too aggressively, and a **maximum size cap** (within your plan and account limits) keeps it bounded — set a lower cap yourself for tighter control.\n- **Transparent cost**: The instance page shows autoscaling status and the projected monthly cost of the next scale-up, billed at the standard per-GiB storage rate.\n\n> Storage grows but never shrinks automatically. Pick a maximum size that fits your budget.\n\n## Version Upgrades\n\nMove a **MySQL** or **PostgreSQL** instance to a newer engine version in place — no need to recreate it or dump and reload your data.\n\n1. Open the **Updates** tab on your database instance\n2. Pick an available target version\n3. Start the upgrade — a snapshot is taken automatically first, so you can restore if anything looks wrong afterward\n4. Track progress live on the instance page; the instance shows an **Updating** status across the dashboard while the upgrade runs\n\nAvailable today for MySQL and PostgreSQL, and upgrades follow supported version paths (for example, MySQL 8.0 → 8.4 → 9.0/9.1). Take a manual snapshot first if you want an extra restore point.\n\n## SQL Studio\n\nEvery managed **PostgreSQL** instance includes [SQL Studio](https://docs.danubedata.ro/databases-sql-studio) — a full database GUI in your browser, with no client to install and no credentials to copy:\n\n- Browse schemas, tables, and rows with sorting, filters, and pagination\n- Edit data with staged, transactional commits (applied all-or-nothing)\n- Run ad-hoc SQL with a read-only safe mode, saved snippets, query history, and CSV/JSON export\n- Create, rename, duplicate, and drop tables; import from CSV; visualize relationships with ER diagrams\n\nSQL Studio is included free with every PostgreSQL plan. It is not available for MySQL or MariaDB. See the [SQL Studio guide](https://docs.danubedata.ro/databases-sql-studio) for details.\n\n## High Availability\n\nFor managed **PostgreSQL**, enable the **High availability** setting to run your instance with a synchronized standby and **automatic failover** — if the primary becomes unhealthy, a standby is promoted for you, with near-zero downtime during planned changes. Replication, standby provisioning, and failover are all handled by the platform.\n\nAll engines also support [read replicas](https://docs.danubedata.ro/databases-replicas), which add read capacity through a load-balanced reader endpoint and can be promoted to primary for resilience.\n\n## Cloning\n\nNeed a copy of a database — for staging, testing, or a migration dry-run? Clone any managed database into a brand-new instance from the dashboard. The clone is an independent instance with its own connection details and password; changes to it never affect the original.\n\n## Monitoring\n\nTrack database performance:\n\n### Key Metrics\n- **CPU Usage**: Monitor compute resources\n- **Memory Usage**: Track RAM and buffer pool\n- **Connections**: Active and max connections\n- **Queries per Second**: Throughput\n- **Disk I/O**: Read/write operations\n- **Replication Lag**: For replicas\n\n### Metric Alerts\nSet your own thresholds on a database and get an email when they're breached — and again when they resolve:\n- High CPU usage\n- Memory exhaustion\n- Disk usage\nCreate and manage these from the **Alerts** section; see [Alerting](https://docs.danubedata.ro/monitoring-alerting).\n\n### Health Monitoring\nWe watch the health of your database around the clock. If it runs into trouble — a crash loop, out-of-memory, image-pull failure, and more — your whole team is notified by email and in the Notification Center, and a warning banner appears on the instance page. Alerts clear themselves automatically once the database recovers. No setup required.\n\n### Log Explorer\nSearch, filter, and live-tail your database logs from the **Logs** page under **Observability** — by level, keyword, or regex pattern — or jump straight into a database's logs from its own instance page. See [Logs](https://docs.danubedata.ro/monitoring-logs).\n\n## Best Practices\n\n### Performance\n1. Use appropriate indexes\n2. Optimize queries\n3. Configure buffer pool size\n4. Use connection pooling\n5. Monitor slow queries\n\n### Security\n1. Use strong passwords\n2. Enable firewalls\n3. Use private networks\n4. Restrict access by IP\n5. Enable SSL/TLS\n\n### Reliability\n1. Enable automated backups\n2. Take manual snapshots before major changes\n3. Test restore procedures\n4. Monitor replication lag\n5. Set up read replicas\n\n### Cost Optimization\n1. Right-size your instance\n2. Stop idle databases to pause hourly compute billing\n3. Clean up old data\n4. Archive historical data\n5. Delete unused snapshots\n\n## Troubleshooting\n\n### High CPU Usage\n1. Identify slow queries\n2. Add missing indexes\n3. Optimize queries\n4. Consider upgrading instance\n\n### Connection Errors\n1. Check firewall rules\n2. Verify connection details\n3. Check max connections setting\n4. Review connection pool settings\n\n### Replication Lag\n1. Check network connectivity\n2. Review primary load\n3. Increase replica resources\n4. Optimize queries on primary\n\n## Next Steps\n\n- [MySQL Documentation](https://docs.danubedata.ro/databases-mysql)\n- [PostgreSQL Documentation](https://docs.danubedata.ro/databases-postgresql)\n- [MariaDB Documentation](https://docs.danubedata.ro/databases-mariadb)\n- [Database Replicas](https://docs.danubedata.ro/databases-replicas)\n- [Parameter Groups](https://docs.danubedata.ro/databases-parameters)\n\nNeed help? Contact our support team through the dashboard.\n\n","prev":{"title":"Snapshots","slug":"vps-snapshots","url":"https://docs.danubedata.ro/vps-snapshots","markdown_url":"https://docs.danubedata.ro/vps-snapshots.md","json_url":"https://docs.danubedata.ro/vps-snapshots.json"},"next":{"title":"MySQL","slug":"databases-mysql","url":"https://docs.danubedata.ro/databases-mysql","markdown_url":"https://docs.danubedata.ro/databases-mysql.md","json_url":"https://docs.danubedata.ro/databases-mysql.json"},"index_url":"https://docs.danubedata.ro/index.json"}