So you Want Hosted MySQL?

HOSTEDREFERENCE
10 min read

Here at DoltHub, we've had a lot of success with our "So you want..." series of blog posts helping people find Dolt when they are looking for it. Dolt is a lot of things. Dolt is a version controlled database, a Git database, Git for data, data version control, an immutable database, and a decentralized database. Imagine if Git and MySQL had a baby. That's Dolt.

And now, Hosted Dolt can deploy a MySQL primary with a Dolt replica in the cloud of your choice, giving any MySQL database an immutable, queryable audit log of every transaction. This Dolt replica can be used for disaster recovery or compliance. That means Hosted Dolt is now Hosted MySQL as well.

What are your current options when it comes to Hosted MySQL? This blog will explain what Hosted MySQL is, what you should look for in a Hosted MySQL provider, and then walk through some of your options. We think Hosted Dolt is a credible Hosted MySQL alternative for many use cases.

What is Hosted MySQL?

Before cloud infrastructure, there were servers. If you wanted to run MySQL, you got yourself a server, downloaded MySQL, configured MySQL and the server, and ran the configured MySQL. This was your only option.

But running a database like MySQL is a pain. You have to worry about host failure, backups, replication, failover, upgrades, and access control. Running MySQL in production requires a lot of specialized infrastructure knowledge and engineering. In the past, your team had to have those skills to run MySQL smoothly.

With the introduction of cloud infrastructure like Amazon Web Services (AWS) and Google Cloud Platform (GCP), you now can have infrastructure experts run your servers and databases for you, including MySQL. If you have a cloud provider run MySQL on your behalf, this is called Hosted MySQL or Cloud MySQL. Your Hosted MySQL is exposed on a public or private endpoint and you connect to it with any MySQL client. Usually, you have no ssh access to the server running MySQL. If something goes wrong, the cloud provider either fixes it for you or provides the tools necessary for you to fix it yourself.

Often, the cost in engineering resources of running MySQL yourself is much higher than letting a cloud provider run it for you. For this reason, most teams choose Hosted MySQL if they are running MySQL in production and don't have security or data co-location requirements.

Hosted vs Managed MySQL

Hosted MySQL is what is described above. A cloud provider runs MySQL on your behalf and you connect to it with a MySQL client. The servers used to run MySQL are opaque to you. You have no access to the physical infrastructure running MySQL.

Managed MySQL is slightly different but in the same category. For managed MySQL, you give a vendor access to your infrastructure to operate the MySQL deployment. This means you still have physical access and control of the servers but a vendor is providing you tools to run MySQL more efficiently. This is often done to satisfy security, data co-location, or compliance requirements.

Moreover, with the introduction of "virtual privater clouds" (VPC), you can have a Managed MySQL in the cloud, confusing things just a bit more. I use the following rubric to differentiate hosted from managed: hosted = no ssh access, managed = ssh access.

What do you want in your Hosted MySQL?

When looking at your Hosted MySQL options you should think about the following characteristics in roughly the priority order listed.

1. Reliability

Generally, the core of your application is your MySQL database. If your Hosted MySQL is unavailable your application is unavailable. Even worse, if your Hosted MySQL loses or corrupts data, at best, you're in for an arduous recovery process. At worst, you have to tell your customers that their data is lost. For these reasons, you should prioritize reliability over any other vector when choosing a Hosted MySQL platform.

Reliability is created by running good physical infrastructure. How well does the cloud provider build data centers, power redundancy, networks, and all the other physical underpinnings of your Hosted MySQL deployment? This will influence the number of service interruptions you can expect with your Hosted MySQL.

Control plane software is the software that deploys and manages your Hosted MySQL. This software is responsible for tasks like reliably making backups and failing over to a secondary in the event of a primary failure. The quality of this control plane software influences reliability, often more than the quality of the physical infrastructure. Most Hosted MySQL outrages are caused by bad control plane software.

I will also group security under reliability even though some would consider this a different dimension. The provider you choose should have physical and software security qualifications. You do not want unauthorized access to your Hosted MySQL instance. Security events are like data loss or corruption events. At best, you are in for an arduous recovery process. At worst you have to tell your customers their data is lost or stolen.

The good news is, most of the providers listed in this article offer similar levels of reliability. Most smaller companies deploy on the big cloud provider's infrastructure, mimicking much of their reliability profile.

2. Ease of Use

The Hosted MySQL platform you choose should be easy to use. It should have a simple, functional user interface, usually on the web. If you need more programmatic access to deployments or administrative functions, an API can be useful.

There is a balance between features and ease of use. The more complicated the cloud offering, the more options the user interface must provide. Often, especially if you're not a MySQL or system administration expert, you will not know what many of the options do. This can be confusing and lead to mistakes. Pick the Hosted MySQL option that has enough features to satisfy your use case but not so many that you don't understand which options to choose. For instance, AWS often suffers from an over-abundance of configuration options. Smaller providers offer fewer, more specific options and guide your choices more appropriately.

3. Features

This is where the choice gets interesting. Most Hosted MySQL offerings have a similar set of features. You get a MySQL endpoint to connect to with some logging and metrics to inspect what is going on on your deployment. Some offerings have advanced features like autoscaling, enhanced rollback capabilities, better developer tools for interacting with the instance, and much more. If you're looking for something specific this article can help you find what you are looking for.

4. Support

How easy is it to talk to a human if you have a question or something goes wrong with your Hosted MySQL? Is the person a customer service representative or an engineer? If the person is an engineer, how much expertise do they have in the Hosted MySQL system? Being able to get in contact with qualified support staff quickly and easily matters.

As a rule of thumb, I would prefer smaller vendors over large vendors when it comes to support quality. Large vendors suffer from the "support is a cost center that must be minimized" problem. Small vendors are young and hungry and you're often getting support from the engineers that built the offering. I highly prefer this method of support to a customer service representative or solutions engineer triaging my issue.

5. Cost

Finally, we have cost. The Hosted MySQL space is very competitive and most offerings are priced similarly. You will pay more for a smaller vendor who offers more features over a large cloud provider. The cost versus value trade off of the additional features is something you should consider.

Hosted MySQL Options

There are lots of Hosted MySQL options, just search for hosted mysql or cloud mysql options. I've combed through the options and selected the ones I think are most interesting. This is by no means an exhaustive list.

Major Cloud Providers

Major Clouds

The major cloud providers, Microsoft, Google, and Amazon, have Hosted MySQL offerings: Azure SQL database, Google CloudSQL and AWS RDS respectively. These are pretty undifferentiated. If you want a vanilla MySQL deployment, just choose the option from the cloud you are in.

Oracle owns MySQL. Curiously, Oracle Cloud does not offer a vanilla Hosted MySQL offering. They have MySQL Heatwave which adds an extra non-open source layer on top of MySQL to improve query performance. I find this extremely strange. Heatwave is comparable to AWS Aurora and Planetscale which I'll tackle next.

AWS also offers Aurora, which is MySQL-compatible but not specifically Hosted MySQL. This is similar to Planetscale, which I dive more deeply into below, in that it is horizontally scalable with better performance and throughput. Both Aurora and Planetscale are MySQL under the hood with some extra software to manage partitioning and scaling. This is a hard problem and if you're building an application that already needs or may eventually need a really big MySQL database, Heatwave, Aurora, or Planetscale are good options. Planetscale leans more heavily open source being based on Vitess, if that's your thing. I recommend Planetscale because we here at DoltHub believe in the power of open source.

Finally, we have Digital Ocean which is a smaller, more developer-friendly cloud. Digital Ocean has a vanilla Hosted MySQL offering but also offers Cloudways which adds a management layer on top. Cloudways also suggests they "optimize your MySQL for speedy performance" which may mean some additional configuration tuning that you would have to do yourself on Azure, AWS, or Google Cloud.

Differentiated Offerings

Managed Services

The following Hosted MySQL offerings are differentiated in some way. The first two offerings, Aiven and ScaleGrid, are very similar and offer a couple of differentiated features over a major cloud provider. Planetscale and Hosted Dolt offer the most differentiated feature set.

Aiven

Aiven offers a standard Hosted MySQL offering complete with backups, replication, logs, monitoring, and failover. Aiven offers two differentiated features: multi-cloud replication and "Point-in-time-Recovery".

For multi-cloud replication, Aiven allows you to set your primary up in a cloud and then replicate to one of their five supported clouds. This is pretty cool and if you need multi-cloud replication, Aiven could be a winner.

Point-in-time-recovery support allows you to set a recovery window. You can restore to any point within the recovery window. It seems from their documentation, the window is set as the binlog retention period. I'm not certain how you specify point-in-time when requesting a restore but I'm suspecting it is timestamp. Then, when restoring, Aiven restores from a backup and plays the binlog to the point you requested.

Aiven advertises 100% human support so I think you'll get more attention from Aiven than from a major cloud provider.

ScaleGrid

ScaleGrid is very similar to Aiven, offering all the standard Hosted MySQL features. ScaleGrid does a pretty good job of breaking down exactly how they are different than the big cloud providers. As far as I can tell, most of the features listed are also in Aiven.

ScaleGrid offers one additional notable feature. Remember my Hosted vs Managed MySQL rubric: hosted = no ssh access, managed = ssh access. Well, ScaleGrid breaks it. ScaleGrid provides Hosted MySQL but gives you SSH access. This allows you to have full operational control over MySQL if you need it. This includes installing custom MySQL plug-ins on-host, a unique feature of ScaleGrid.

Being a small company, ScaleGrid offers premium support which should be better than a major cloud provider.

Between Aiven and ScaleGrid, I don't know enough to recommend one. If you need SSH access but still want Hosted MySQL, go with ScaleGrid. If you need multi-cloud replicas, go with Aiven. Otherwise, it's a coin flip to me.

PlanetScale

Here at DoltHub, we're very familiar with PlanetScale. We most often get compared to PlanetScale because we're both MySQL-compatible, both are built on Vitess, and both offer forms of database branching. However, in our minds, we're not really competitive.

PlanetScale offers a horizontally scalable, high performance, MySQL-compatible database with great developer tooling. PlanetScale is for big, production-grade MySQL deployments. Dolt is for normal scale MySQL deployments that need Git-style version control of data and schema and/or a full immutable audit log of changes.

As mentioned above, PlanetScale is most similar to MySQL Heatwave or Aurora in the sense that is a horizontally scalable and high performance variant of MySQL. Unlike the previous two options, PlanetScale's partitioning layer, Vitess, is free and open source. In Dolt, we use a fork of Vitess for its MySQL parsing and wire protocol implementation but we don't use the partitioning piece. As I said above, because of open source, we'd recommend using PlanetScale over the Oracle and Amazon offerings if you're building an application that already needs or may eventually need a really big MySQL database.

Additionally, PlanetScale has a great developer interface including branches. PlanetScale's branching workflow allows for schema changes to be made on an isolated copy of the database, tested, and merged in later. There's a great CLI. Just by looking at PlanetScale's documentation, you can tell it was built by developers for developers.

Hosted Dolt

Last but not least, we get to the newest Hosted MySQL offering. For those of you seeing Dolt for the first time, Dolt is the world's first version controlled SQL database. Dolt is built from the storage engine up to add Git-style version control of schema and data to SQL tables. Dolt is fully MySQL-compatible but contains no MySQL code. Dolt is like Git and MySQL had a baby.

DoltHub, the company that maintains Dolt, has offered a Hosted Dolt offering since 2022. Dolt started supporting replication from a MySQL primary in February 2023.

Replication from a MySQL primary makes every SQL transaction commit a Dolt commit on the Dolt replica, giving you a full, immutable, queryable audit log of your MySQL primary on your Dolt replica. This audit log can be used for disaster recovery, analytics, or compliance. Moreover, you can allow developers to clone a copy of the Dolt replica and debug an isolated copy of the production database. If a change is made to the clone, a SQL patch file can be generated to apply back to your MySQL primary. It's an incredible set of new functionality that only requires a Dolt replica. Nothing needs to change on your primary MySQL.

Before last week, if you wanted a Dolt replica of a Hosted MySQL in another cloud, you needed to set it up yourself. As of last week, Hosted Dolt now supports a MySQL primary, meaning you get DoltHub's world-class Hosted support on a MySQL primary. Bring your MySQL primary use cases to Hosted Dolt.

Hosted Dolt supports all the features of other Hosted MySQL providers including, backups, replication, logs, monitoring, and failover. Hosted Dolt even has a built-in SQL workbench with diffs and pull requests. Just use SQL patch files to deploy changes to your primary.

If you're looking for immutable queryable audit logs on your MySQL or just want a better MySQL development experience, check out Hosted Dolt with a MySQL primary. Of course, you can also migrate your MySQL primary to a Dolt primary and get the full Dolt experience.

Conclusion

DoltHub is in the Hosted MySQL business. This blog outlines all of your Hosted MySQL options and tries to point specific use cases in the right direction. Curious to talk Hosted MySQL? Come by our Discord and we'll help you pick the Hosted MySQL that is right for your use case.

SHARE

JOIN THE DATA EVOLUTION

Get started with Dolt

Or join our mailing list to get product updates.