Managed MySQL
MySQL 8.4, one node or a three-node group with automatic failover.
What it is
MySQL Community Server 8.4 LTS — the GPL server Oracle publishes, unmodified — on machines of its own in your region, reachable only inside your network. One node for development and small sites, or three nodes in a Group Replication group that fails over by itself when the primary goes. Find it under MySQL in the console.
It is MySQL-compatible in the plain sense: anything that speaks the MySQL protocol and works with MySQL 8.4 (WordPress, Laravel, Shopware, Magento, Nextcloud, Moodle, Django, Rails, Spring, Prisma, …) connects with a mysql:// URL.
Concepts
| Term | Meaning |
|---|---|
| Cluster | One MySQL database server, of 1 or 3 nodes, identified by the name you give it. |
| Node | One machine running mysqld on a data volume of its own. Three nodes sit in two zones (de1a, de1b) and never share a physical host. |
| Group | Every cluster is a MySQL Group Replication group in single-primary mode: one primary takes writes, the secondaries apply every transaction the group commits. A transaction commits only once a majority certified it. |
| Private address | The cluster's address in its network. Port 3306 always reaches the primary; with three nodes, port 3307 reaches the secondaries (read-only). |
| TLS | On by default: clients must use TLS (require_secure_transport). The certificate is the platform CA's, for the cluster address and every node address. Traffic between the nodes is always TLS. |
| Admin user | admin, with every privilege an application and its migrations need (users and grants included, WITH GRANT OPTION), but not the ones that stop the group or read the host's files. Password in Secrets as MYSQL_<NAME>_PASSWORD. |
| Backup | An encrypted copy of the data in object storage: one a day (kept 7 days) plus the ones you take. |
| Activity | The event stream on the cluster page: every provisioning step, every group change and failover, what the nodes reported. |
The data volumes are LUKS2 with a key per volume, held by the control plane under the platform key or one of your KMS keys (kmsKeyId), released to the node only while the volume is attached to it. Deleting the cluster deletes the keys.
How to
Create a cluster
MySQL → Create cluster, or:
POST /mysql/api/clusters
{
"identifier": "shop",
"nodeType": "performance-2",
"nodes": 3,
"databaseName": "shop",
"volumeSizeGib": 40
}or dcloud mysql clusters create --identifier shop --node-type performance-2 --nodes 3. Without vpcId the cluster joins your default network, where deployed apps run. It is creating until every node is ONLINE in one group — about three to five minutes; the Activity tab shows each step.
Connect
From an app or a machine in the same network, with the password from Secrets:
mysql --ssl-mode=VERIFY_IDENTITY --ssl-ca=dcloud-ca.pem -h 10.0.0.9 -u admin -p shopdcloud-ca.pem is GET /mysql/api/ca-bundle (app containers already trust it). The URL form is mysql://admin:<password>@10.0.0.9:3306/shop?ssl-mode=REQUIRED; the cluster page shows it with the password left out.
Every table needs a primary key
Group Replication certifies each transaction row by row, by primary key, so a table without one cannot be replicated safely. The server refuses to create one (sql_require_primary_key): CREATE TABLE t (v INT) fails with error 3750. Add a primary key, or an id BIGINT AUTO_INCREMENT PRIMARY KEY column. This applies to one-node clusters too, so a cluster can grow to three nodes later. MyISAM and the other non-transactional engines are disabled; use InnoDB.
Failover
With three nodes, when the primary's machine stops answering the others notice within about five seconds, expel it, and elect a new primary among themselves; the balancer's health check (every 3 s, on each node: "am I ONLINE, PRIMARY, and in a majority?") moves port 3306 to it. Nothing in the control plane is on this path. Connections to the old primary break; clients reconnect to the same address. A transaction that had not committed when the primary went is rolled back, so it is never half-applied.
A node that comes back joins the group again on its own and catches up from the others (by a full copy, the clone plugin, if it was gone too long). A node cut off from the majority stops taking writes within 30 seconds, so the minority side never accepts a write the majority does not have.
If every node goes down at once, the control plane chooses the node holding every transaction the others have and tells it to start the group again; the others join it. It waits until at least two of the three nodes report.
Test it: Overview → Nodes → Reboot on the primary, or POST /mysql/api/clusters/{id}/reboot.
Reader endpoint
With three nodes, port 3307 on the cluster address is the reader endpoint: it spreads new connections over the secondaries, read-only (readerEndpoint in the API, Connection → Reader endpoint in the console). Send reports, searches and other reads that may be a moment behind to it, and keep 3306 for writes and for reads that must see a write just made.
Each node's health check decides whether it belongs: a secondary more than 1000 transactions behind the primary (its applier queue) leaves the reader endpoint and comes back once it is fewer than 100 behind; Activity says when. When no secondary qualifies — both are behind, rebooting or gone — the primary serves port 3307 too, so reads keep working; Activity says "the reader endpoint sends reads to the primary" and the API shows readerEndpoint.fallbackToPrimarySince. Each node's place is on Overview → Nodes and in the API (inReaderEndpoint). A one-node cluster has no reader endpoint; grow it to three nodes for one.
Rotate the password
Connection → Rotate password, or POST /mysql/api/clusters/{id}/password/rotate. A new version goes into Secrets; the primary applies it within 30 seconds with ALTER USER … RETAIN CURRENT PASSWORD, so the previous password keeps working for one more hour while your apps move over. Then it is discarded.
Backups and restore
Every day each cluster takes a backup, kept seven days; Backups → Back up now (POST /mysql/api/clusters/{id}/snapshots) takes one now, kept until you delete it — also after the cluster is deleted. A secondary takes it (the primary on a one-node cluster) with MySQL's clone plugin: a consistent copy of the data while the node keeps serving. It is compressed, encrypted with a key of its own and uploaded to object storage; the node needs free space on its volume for the copy while it works, so keep the volume under half full.
Restoring makes a new cluster: Backups → Restore into a new cluster, or POST /mysql/api/clusters with "snapshotId". The new cluster gets its own admin password.
Restore to a point in time
Besides the backups, the primary uploads its binary log — every committed transaction — to object storage: it closes the current file every five minutes when there were writes, and each file is encrypted with a key of its own. So you can restore to any second from your oldest backup until a few minutes ago (at most five minutes plus the upload; an idle cluster has nothing new to upload).
Backups → Restore to a point in time shows the restorable ranges; GET /mysql/api/clusters/{id}/restore-window returns them. A range starts at a backup and ends where the uploaded binary logs end; a log that was never uploaded (for example, removed to free a full volume first) splits it, and the window says so rather than failing at restore time.
To restore, POST /mysql/api/clusters with "pointInTime": {"clusterId": "ewm-…", "time": "2026-11-14T03:12:45Z"} (needs mysql:CreateMysqlCluster on that cluster). The new cluster's first node unpacks the latest backup before that second, replays the binary logs up to and including it, and only then starts serving; Activity says how many logs it replayed and the last transaction it holds. The source cluster is not touched. Binary logs are kept seven days, like the daily backups, and are deleted with their cluster: a deleted cluster can be restored from its manual backups only.
Grow to three nodes, or shrink to one
Overview → Grow to 3 nodes, or PATCH /mysql/api/clusters/{id} with {"nodes": 3} (CLI dcloud mysql clusters modify --id … --nodes 3). The cluster is modifying while it works; Activity shows each step:
- Node 0 is told the new members and stops starting a group of its own after a restart.
- Two machines are built in the other zones and join the running group with a full copy of the data (MySQL's clone plugin). Node 0 keeps serving as the primary the whole time.
- The cluster address moves from node 0 to a new private balancer. Connections to the cluster address fail while it moves — 40 to 60 seconds in our measurements, most of it creating the balancer; Activity says how long it took. Plan a grow like a short maintenance. From then on, port 3306 follows the primary and port 3307 reaches the secondaries.
{"nodes": 1} shrinks: node 0 becomes the primary (a planned switchover, about a second), nodes 2 and 1 leave the group one at a time and are deleted with their volumes, and the address moves back to node 0 (about 30 seconds in which connections to the cluster address fail). Your data stays on node 0.
Clusters created before 2026-11-14 hold the cluster address on their node itself and cannot change their node count; the API says so. Restore a backup into a new cluster with the count you want instead.
Reboot a node
POST /mysql/api/clusters/{id}/reboot with {"nodeId": "…"} (default: the primary). A secondary reboots at once. The primary first hands its role to the healthiest secondary — a planned switchover the primary carries out at its next report, within 30 seconds — and reboots once the new primary reports; the answer says "reboot": "switching-over", and Activity shows each step. Without a healthy secondary it reboots straight away ("rebooted-without-switchover") and the group elects a primary itself, as on a failure.
OS updates
Every node installs Ubuntu's security updates each night by itself. Updates that need a restart (a new kernel, libc) wait for the platform window, 02:00–05:00 UTC, and then go one node at a time: the secondaries first, each only when every node is ONLINE and caught up again after the previous one; the primary last, after handing its role to a secondary. Overview → OS patches shows per node what is pending and why a restart waits. A one-node cluster restarts inside the window and is unavailable for one to two minutes; with three nodes, writes pause for about a second at the switchover.
Delete a cluster
Danger zone → Delete, or DELETE /mysql/api/clusters/{id}. Machines, volumes (and their keys), the balancer, the password and the daily backups go; manual backups stay.
With a final backup (the Take a final backup box, on by default; ?finalSnapshot=true in the API): a backup is taken first, counted and kept like one you took by hand, until you delete it. The delete waits for it (usually a few minutes; up to 20); if it fails, nothing is deleted and the cluster is available again, with the reason in Activity. Restore a new cluster from it as from any backup. The dialog says what keeping it costs, from the size of the newest backup and the rate per GiB-month.
Run outside Germany (Helsinki, fi1)
Clusters are in Germany (de1) unless your organization decides otherwise. After an administrator turns on Allow EU locations outside Germany (Settings → Data location), choose region fi1 in the create form, or send "regionId": "fi1" (header X-EWS-Region: fi1, CLI --region fi1). The nodes, their disks and the balancer are in Helsinki, Finland; the network must be one in fi1 too. Backups are stored in Germany (encrypted, in the platform's object storage). fi1 has one zone, so a 3-node cluster survives losing a machine, not the site. Without the setting the create answers 403.
Reference
Ports
| Port | What |
|---|---|
3306 |
The primary (read-write), on the cluster address |
3307 |
The reader endpoint, read-only (3 nodes), on the cluster address |
| — | No X Protocol (33060); no port on the machines' public addresses |
Machine
mysqld runs from the official mysql:8.4 image under podman. The InnoDB buffer pool is 60 % of the machine's memory less 512 MB (at least 128 MB); max_connections is memory ÷ 8 MB (100–2000). Binary logs are kept 7 days, or less when the volume fills (see When the volume fills).
When the volume fills
The binary log holds every row you write a second time, so a volume fills faster than your tables grow. Each node watches its volume every 30 seconds:
- 85 % — it removes all but the newest binary log and says so in Activity ("removed 8192 MB of binary logs"). Nothing needs them: a node that rejoins after missing them is copied in full.
- No binary logs left — Activity warns every 30 minutes that the volume is nearly full of your data.
- 97 % — it hands back a 512 MB reserve it keeps on the volume, so that
DELETEandDROP TABLEcan still run and blocked writes resume. Free space then. The reserve is put back once the volume is below 80 %. - Full — MySQL refuses inserts with
ERROR 1114 … is full; some writes wait instead of failing.
Growing the volume is not possible yet: delete data, or restore a backup into a new cluster with a larger volume. Character set utf8mb4, collation utf8mb4_0900_ai_ci.
What failures cost, measured
Measured on Deutsche Cloud's development platform (performance-2 nodes, November 2026) with a client opening a TLS connection and writing one row every 250 ms through the cluster address. "Lost" counts writes the client had been told were committed and that were missing afterwards.
| What happens | Writes fail for | Acknowledged writes lost | Afterwards |
|---|---|---|---|
| A secondary loses power (3 nodes) | not at all | 0 | back in the group by itself in about 75 s |
| The primary loses power (3 nodes) | about 27 s (another node is elected) | 0 | the old primary rejoins as a secondary by itself in about 75 s |
| The primary is cut off from the network | about 28 s | 0 | rejoins about 40 s after the network is back |
| You reboot the primary (Reboot, or the API) | about 5 s (it hands its role over first) | 0 | back as a secondary in about 80 s |
| A one-node cluster loses power | about 40 s | 0 | serving again by itself |
| Growing 1 → 3 | 40–60 s while the address moves to the balancer | 0 | about 5 minutes end to end for small data |
| Shrinking 3 → 1 | about 30 s while the address moves back to node 0 | 0 | about 3 minutes end to end |
| Restoring to a point in time | (a new cluster; the source is not touched) | — | serving 2½ min after the request for 130 MB, to the second |
| The volume fills | inserts fail with ERROR 1114; DROP and DELETE work |
0 | see When the volume fills |
On the reader endpoint (3307), a secondary that loses power costs a few new connections a timeout of about 3 seconds each, until the balancer's check (every 3 seconds) takes it out. A write in flight when the primary fails is either committed on the new primary or rolled back, never half-applied; its client sees an error (Lost connection) and should retry. Set a read timeout in your client: a write sent to a machine that has just lost power waits until TCP gives up otherwise.
Statuses
| Status | Meaning |
|---|---|
creating |
Machines being built, or the group not yet formed |
available |
Every node ONLINE in one group (at creation) |
rebooting |
A one-node cluster restarting |
modifying |
Growing or shrinking (nodes joining or leaving) |
deleting |
Being torn down |
failed |
Provisioning failed; the reason is on the cluster page |
Billing
Every node bills per node-hour (mysql.<type>.hour) from the moment its machine exists until deletion starts. The balancer of a 3-node cluster and backup storage are not billed.
What is not supported
Restoring over an existing cluster (a restore is always a new cluster), node counts other than 1 and 3, changing the node type of an existing cluster, public access, more databases or users through the API (create them with SQL as admin), binding a cluster to an app (use the URL as a secret), MariaDB, multi-primary mode, Terraform resources.
Troubleshooting
ERROR 3750 … without a primary key— see Every table needs a primary key.Connections using insecure transport are prohibited— connect with TLS (--ssl-mode=REQUIREDor stricter), or create the cluster with"tls": false.The MySQL server is running with the --super-read-only option— you are on a secondary (port 3307, or a node address). Write to port 3306 on the cluster address.- A node shows
ERRORorRECOVERINGfor long — the Activity tab says why; a node rejoins on its own, by a full copy if it fell too far behind.