MySQL Replication

Establish Replication

Build a new slave server and configure it to replicate from an existing database.

Establish Master-Master Replication

Establish circular replication between two servers. This is a common configuration to form the root of a larger, more complicated hierarchy.

Add a Slave by Cloning an Existing Slave

If you need to add read capacity or replace a failed slave, use this procedure to build a new slave without disturbing the master.

Repair Replication

When replication fails, you need to diagnose the problem, fix it, and restart replication without losing data.

Promote a Slave to Replace a Failed Master

When the replication master fails, promote the most up-to-date slave and redirect the other slaves to replicate from it.

Fail Over MySQL with HAProxy

Using an established master-master pair, move traffic to the secondary when the primary fails.

Build a Replication Relay

In a very large MySQL replication hierarchy, it may not be practical for all slaves to replicate directly from the master. Instead, a Relay server replicates from the Master, and slaves replicate from the Relay.

Establish Semi-Synchronous Replication

Semi-synchronous replication ensures at least one slave has a safe copy of every transaction the master has acknowledged.

Encrypt Replication Traffic

Sometimes you can't trust the transport security between two servers, especially between datacenters. In this lesson, we'll use MySQL's built-in SSL support to encrypt replication traffic.

Configure Row-Based or Mixed Mode Replication

Some transactions can not be reliably replicated using MySQL's default statement-based replication. Row-based and mixed mode replication can improve slaves' data integrity for those transaction types.

MySQL Administration

Recover the MySQL Root Account

The passwords for MySQL accounts are stored as one-way hashes. In this lesson, you'll recover control of the 'root' account by overwriting the password hash.

Real-time Performance Info with mytop

The mytop tool summarizes MySQL performance information in a full-screen live-updating view, like the top tool for the operating system.