Skip to content

MySQL Replication

Setting up MySQL replication manually is one of the most technically demanding database administration tasks. Binary log positions, replication users, network binding, GTID modes — a single misconfiguration can cause data loss or silent replication drift.

RasnuCloud handles the entire setup through a conversation, configured correctly for your specific MySQL version and network environment, with verification at every step.


Setting Up Replication

You'll need two servers connected to RasnuCloud — the source (primary) and the destination (replica). Start separate conversations with each, or coordinate in a migration plan.

On Your Primary Server

Set up MySQL replication — configure this server as the primary.
The replica's IP is 10.0.0.2. Both servers are on a private network.

RasnuCloud will prepare the primary: create a dedicated replication user with the minimum required privileges, enable binary logging with a safe configuration, and give you everything needed to connect the replica.

On Your Replica Server

Configure this server as a MySQL replica of 10.0.0.1.
The replication user is 'replicator'. Here is the primary's current binlog status:
[paste what RasnuCloud gave you from the primary]

RasnuCloud handles the import of a consistent data snapshot from the primary, configures the replica connection, starts replication, and verifies it is running without lag.


Verifying Replication Health

After setup, ask RasnuCloud to confirm everything is healthy:

Is MySQL replication running correctly? What is the current replication lag?

RasnuCloud queries the actual replication status — not a cached value — and reports the lag, whether the replica is reading binlogs correctly, and any errors that have occurred.

RasnuCloud's server intelligence also monitors replication health continuously. If replication lag exceeds your alert threshold, you'll be notified immediately.


Handling Replication Issues

Replication can break in production. When it does, every second of lag is a risk:

MySQL replication is broken — the replica is showing an error. Diagnose and fix it.
Replication lag is growing and isn't recovering. Find the cause.
I need to reset replication and resync the replica from scratch.

RasnuCloud reads the actual error state and replication logs on your server to diagnose accurately — not suggest generic fixes.


Promoting a Replica

When you need to promote a replica to primary — for failover or planned maintenance:

My primary MySQL server is down. Promote this replica to standalone primary
so my application can connect to it directly.

RasnuCloud stops replication cleanly, reconfigures MySQL as a standalone primary, and reports the steps you need to take to update your application's connection string.


Read Traffic Distribution

Once replication is running, RasnuCloud can help you configure your application or a connection proxy to route read queries to the replica:

Configure ProxySQL to route SELECT queries to the replica and write queries to the primary

Monitor Replication Lag Automatically

Configure a replication lag alert from any conversation: "Alert me if MySQL replication lag on this server exceeds 30 seconds." RasnuCloud sets up the monitoring rule immediately.

Released under the MIT License.