MySQL Hosting: Managed vs Self-Hosted for Production Apps

Serdar Tekin
Serdar Tekin
Co-Founder & CTO
Updated Oct 31, 202614 min read
Written for: Developers, founders, SaaS teams, and small platform teams comparing a managed MySQL database with self-hosted MySQL for production applications.
MySQLMySQL HostingManaged MySQLManaged DatabasesDatabase HostingSaaSDatabase Operations
Last reviewed:
Guide
MySQL Hosting: Managed vs Self-Hosted for Production Apps
rafftechnologies.com/learn
On this page

Key Takeaways

Choose MySQL hosting from the responsibility boundary before comparing server sizes. Managed MySQL reduces database-platform operations while the application team still owns schemas, indexes, queries, migrations, credentials, capacity decisions, and recovery validation. Self-hosted MySQL is strongest when a documented requirement needs host access, custom packages, direct filesystem control, exact patch timing, or custom topology. Size production from queries, connection demand, memory, storage growth, RPO, RTO, backups, and measured restore time. Use the live Raff Managed MySQL page for current features, limits, availability, and pricing.

MySQL hosting is the infrastructure and operating model used to run a MySQL database for an application: compute, storage, connections, backups, monitoring, maintenance, scaling, and recovery.

For a small product team, the practical decision is usually between a managed MySQL database and self-hosted MySQL. Managed MySQL reduces database-platform operations; self-hosting gives deeper host and configuration control but makes your team responsible for patching, backups, monitoring, replication, failover, storage growth, upgrades, and recovery.

Raff Technologies supports both paths. If standard MySQL 8 capabilities fit the application, Raff Managed MySQL is the lower-operations option. If the workload requires root access, custom packages, direct filesystem access, or a topology outside the managed boundary, MySQL can also run on a Raff VM.

For most small teams, choose the operating model before comparing server sizes. Start with ownership, recovery requirements, connection demand, and workload behavior; then choose the production plan.

MySQL hosting: managed vs self-hosted at a glance

ResponsibilityManaged MySQLSelf-hosted MySQL
Database provisioningProviderYour team
Operating-system maintenanceProviderYour team
MySQL service maintenanceProvider within service policyYour team
Backup platformProvider-operated within plan scopeYour team designs and operates it
Point-in-time recoveryService capability when includedYour team configures backups and binary-log retention
Monitoring platformUsually included to a defined scopeYour team selects and maintains it
Storage expansionService workflowYour team plans and executes it
High availabilityService optionYour team designs, tests, and operates it
Root and filesystem accessRestrictedFull control
Schema, indexes, and queriesYour teamYour team
Migration safetyYour teamYour team
Application reconnect behaviorYour teamYour team

Choose managed MySQL when the service supports the workload and your team wants to reduce repetitive database-platform work.

Choose self-hosted MySQL when a documented requirement needs operating-system access, custom packages, direct filesystem control, exact patch timing, or a custom topology.

The important distinction is ownership. A self-hosted database can be easy to create on day one and still become an operations project once it stores production data.

What managed MySQL hosting actually changes

A managed MySQL service does not remove database responsibility. It changes which layer your team operates.

The provider typically owns more of the platform work, such as:

  • database provisioning;
  • operating-system and service maintenance;
  • backup infrastructure;
  • point-in-time recovery tooling;
  • service monitoring;
  • storage expansion workflows;
  • supported high-availability and failover controls;
  • network and access-control features;
  • maintenance and version workflows.

Your application team still owns:

  • schema design;
  • indexes;
  • query performance;
  • migrations;
  • users and application credentials;
  • connection behavior;
  • data-retention decisions;
  • capacity planning;
  • selecting a safe recovery point;
  • validating the application after recovery or failover.

This is why a managed MySQL database is most useful when database operations are required but are not the product your team is building.

Self-hosted MySQL gives control by transferring work to your team

Self-hosting can be the right architecture when a real technical or control requirement falls outside a managed-service boundary.

Common reasons include:

  • root or operating-system access;
  • direct filesystem access;
  • exact package or patch timing;
  • custom plugins or packages;
  • unusual authentication requirements;
  • custom replication topology;
  • local processes that must run beside MySQL;
  • infrastructure requirements that demand host ownership.

The trade-off is full lifecycle responsibility:

Text
VM provisioning + OS hardening + MySQL installation + configuration + patching + TLS + firewall rules + monitoring + alerts + backups + binary-log retention + restore tests + storage growth + replication + failover + major upgrades + incident response

Installing MySQL is the easy part. Operating it reliably through growth, failures, and upgrades is the actual self-hosting cost.

For implementation, see Install MySQL on Ubuntu 24.04. If your software also supports MariaDB, review MySQL vs MariaDB for Production Apps before changing engines.

MySQL hosting should be sized from workload evidence

A production MySQL plan should not be chosen from user count or database size alone. The database must handle query work, connections, memory pressure, temporary operations, binary logs, backups, maintenance, and growth at the same time.

Collect these inputs before choosing a production plan:

  • peak active transactions;
  • queries per second during normal and peak periods;
  • p50, p95, and p99 query latency;
  • expensive statements and full scans;
  • data and index size;
  • storage growth over time;
  • read-to-write ratio;
  • connection count and pool behavior;
  • buffer-pool effectiveness;
  • temporary-table and sort activity;
  • storage latency and throughput;
  • binary-log generation rate;
  • backup duration;
  • measured restore duration;
  • expected growth over the next planning cycles.

CPU pressure can come from necessary work, but it can also come from missing indexes, inefficient joins, reports, or retry storms. Resize after checking whether the work itself can be reduced.

Memory should reflect both the working set and concurrency. MySQL uses memory for the InnoDB buffer pool, connections, sorts, temporary work, caches, and maintenance. Per-connection allocations can multiply quickly across a busy application.

Storage planning should include more than current table size:

Text
data + indexes + binary logs + temporary work + expected growth + migrations and maintenance + operational safety margin

A database can still answer queries while taking too long to restore. Recovery time is therefore part of capacity planning.

Connections and slow queries often determine the first bottleneck

A MySQL workload can run out of safe concurrency before it runs out of raw CPU.

Estimate total connection demand across the application:

Text
maximum application instances x pool size per instance + background workers + scheduled jobs + migrations + monitoring + administrative reserve = planned connection demand

A pool of 10 connections can look small until eight application replicas and several workers create independent pools.

More connections do not guarantee more throughput. Excessive concurrency can increase memory use, lock contention, context switching, and queueing.

Monitor:

  • current and peak connections;
  • threads running;
  • connection errors;
  • long transactions;
  • lock waits and deadlocks;
  • slow-query frequency;
  • temporary tables written to disk;
  • buffer-pool behavior;
  • retry storms;
  • deployment overlap.

Investigate slow queries before increasing the plan size. More CPU and memory can hide inefficient SQL temporarily, but they do not fix the underlying query pattern.

Backups, binary logs, replication, and HA solve different failures

MySQL recovery should separate historical recovery from service continuity.

ControlPrimary purposeWhat it does not solve alone
Logical dumpPortable export and selected recoveryFast full recovery for every large database
Physical backupFull-instance recoveryPoint-in-time history without binary logs
Binary logsPoint-in-time recovery and replication inputA complete base backup
ReplicaAvailability and eligible read scalingRecovery from a replicated bad write
High availabilityFaster recovery from selected node failuresHistorical recovery
Infrastructure snapshotInfrastructure rollback aidA complete database-aware recovery strategy
Restore testProves procedure and durationPrevents the original incident

Replication is not a backup. A replica usually receives accidental deletes, destructive updates, and bad migrations along with valid writes.

Define two business targets before designing protection:

  • RPO: the maximum recent data loss the business can accept.
  • RTO: the maximum time the database and application can remain unavailable.

If the business needs recovery to a specific minute, the recovery design must preserve a suitable base backup plus the required binary-log history. If faster recovery from a host failure is required, high availability may be justified in addition to backups.

Use Database Backup Strategy for SaaS Apps for the wider recovery model and Zero-Downtime Database Migrations when schema or data changes affect the recovery plan.

When managed MySQL is usually the better fit

Managed MySQL is usually the simpler starting point when:

  • the application uses standard MySQL behavior;
  • the team does not want to maintain the database host;
  • backup and recovery infrastructure should be provider-operated;
  • monitoring and slow-query visibility are valuable;
  • private or tightly restricted connectivity is required;
  • storage expansion should be a service workflow;
  • optional high availability may be required;
  • engineering time is more valuable in the application than in repetitive database operations.

This is also a total-cost decision. Comparing one raw VM with a managed MySQL database is incomplete if the VM comparison excludes backups, monitoring, standby capacity, engineering time, restore testing, patching, and on-call response.

If the managed model fits, evaluate Raff Managed MySQL rather than comparing only infrastructure prices.

When self-hosted MySQL is justified

Self-hosting becomes stronger when at least one hard requirement falls outside the managed service:

  • root access is mandatory;
  • direct filesystem access is required;
  • a required plugin or package is unsupported;
  • exact patch timing matters;
  • a custom replication or failover topology is necessary;
  • database operations are already a mature internal capability;
  • compliance or platform requirements demand deeper host ownership.

If none of these apply, self-hosting can create an internal database platform that a small product team must maintain without creating meaningful product value.

For the broader ownership decision, see Managed vs Self-Hosted Databases.

What Raff Managed MySQL currently provides

The live Raff Managed MySQL page currently lists MySQL 8.0 with InnoDB, managed backups, continuous binary-log capture for point-in-time recovery, monitoring and slow-query insights, TLS, IP allowlists, private connectivity, storage expansion, and optional high availability using a Galera cluster.

Raff also provides a free managed-database entry point. The live MySQL page currently shows 1 GB memory, 2 GB storage, and daily backups for the free starting tier. Raff's release notes state that one free managed database per account is available across PostgreSQL, MySQL, or Valkey and that an inactive free database can pause after seven days without a connection. Current eligibility and limits should still be verified on the live product page and console.

A managed architecture can stay compact:

Text
Application -> private or restricted connection Raff Managed MySQL -> managed platform operations -> customer-owned schema, queries, and application behavior

A self-hosted architecture on Raff VMs shifts more work to the customer:

Text
Application VM -> private network MySQL VM -> customer-operated patching, backups, monitoring, replication, HA, and recovery

The right model is the one your team can operate and recover reliably at the required service level.

MySQL hosting buying checklist

Before choosing a provider or plan, document:

  1. Required MySQL major version.
  2. Required plugins or packages.
  3. Current data and index size.
  4. Expected storage growth.
  5. Peak application and worker connections.
  6. Required RPO and RTO.
  7. Whether high availability is required.
  8. Backup retention requirement.
  9. Private-network or public-access requirements.
  10. Who owns restores and production incidents.
  11. Expected migration or exit path.
  12. Total operating cost, including engineering time.

If these are unknown, monthly plan price alone is not enough information to choose production MySQL hosting.

Conclusion

MySQL hosting is not only a provider or monthly-price decision. Start with who owns the database lifecycle, then measure connection demand, slow queries, memory pressure, storage growth, backup behavior, RPO, RTO, and restore time before choosing the production shape.

Managed MySQL is usually the practical choice when the service supports the workload and the team wants a smaller operational surface. Self-hosting is justified when a specific technical or control requirement outweighs the additional maintenance, monitoring, and recovery work.

For teams evaluating Raff, compare the live Managed MySQL service against the checklist above. If the workload requires host-level control outside the managed boundary, evaluate MySQL on a Raff VM instead.

Review Raff Managed MySQL for lower operational ownership, or Raff VM when the workload requires host-level control.

Was this article helpful?
Serdar Tekin
Serdar Tekin
Co-Founder & CTO

Co-Founder & CTO at Raff, focused on cloud infrastructure, systems architecture, security, reliability, and production operations.

Put it into practice

Spin up a Raff server, follow the steps above on real infrastructure, and you are live. Linux or Windows, backed by a 14-day money-back guarantee.

Frequently asked questions

What is MySQL hosting?
MySQL hosting is the infrastructure and operating model used to run a MySQL database, including compute, storage, connections, backups, monitoring, maintenance, scaling, and recovery.
Should a small team use managed or self-hosted MySQL?
Managed MySQL is usually the simpler starting point when supported features fit. Self-host when a documented requirement needs host access, filesystem control, custom packages, exact patch timing, or a custom topology.
What does managed MySQL still leave to my team?
Your team still owns schemas, indexes, queries, migrations, users and credentials, connection behavior, data-retention decisions, capacity planning, recovery-point selection, and application validation after recovery or failover.
Does Raff offer managed MySQL?
Yes. Raff Managed MySQL currently uses MySQL 8.0 and provides managed backups, point-in-time recovery through binary logs, monitoring, slow-query insights, network controls, storage expansion, and optional high availability. Check the live product page for current details.
Does Raff offer a free MySQL database?
Yes. Raff provides a free managed-database entry point. The live MySQL page currently shows 1 GB memory, 2 GB storage, and daily backups; current eligibility and limits should be verified on the live product page and console.
How should MySQL be sized for production?
Size from peak queries, connection demand, memory pressure, data and index growth, storage latency, binary-log volume, backup duration, RPO, RTO, and measured restore time rather than user count alone.
Do MySQL replicas replace backups?
No. Replicas support availability and eligible read scaling but normally copy accidental changes too. Keep independent backups, binary-log recovery where required, and tested restores.
When should a team self-host MySQL?
Self-host when a hard requirement needs root access, direct filesystem control, custom plugins or packages, exact patch timing, or a topology outside the managed-service boundary.