PacktLib: High Availability MySQL Cookbook

High Availability MySQL Cookbook

Credits

About the Author

About the Reviewers

Preface

High Availability with MySQL Cluster

Introduction

Designing a MySQL Cluster

Creating an initial cluster configuration file—config.ini

Installing a management node

Starting a management node

Installing and starting storage nodes

Installing and starting SQL nodes

Creating a MySQL Cluster table

Restarting a MySQL Cluster without downtime

Recovering from a cluster shutdown

MySQL Cluster Backup and Recovery

Introduction

Importing SQL files to a MySQL server and converting them to MySQL Cluster

Taking an online backup of a MySQL Cluster

Restoring from a MySQL Cluster online backup

Restricting write access to a MySQL Cluster with single-user mode

Taking an offline backup with MySQL Cluster

MySQL Cluster Management

Introduction

Configuring multiple management nodes

Obtaining usage information

Adding storage nodes online

Replicating between MySQL Clusters

Replication between clusters with a backup channel

User-defined partitioning

Disk-based tables

Calculating DataMemory and IndexMemory

MySQL Cluster Troubleshooting

Introduction

Single storage node failure

Multiple storage node failures

Storage node partitioning and arbitration

Debugging MySQL Clusters

Seeking help

NIC teaming with MySQL Cluster

High Availability with MySQL Replication

Introduction

Designing a replication setup

Configuring a replication master

Configuring a replication slave without syncing data

Configuring a replication slave, migrating data with a simple SQL dump

Using LVM to reduce downtime on a master when bringing a slave online

Replication safety tricks

Multi Master Replication Manager (MMM): initial installation

Multi Master Replication Manager (MMM): installing the MySQL nodes

Multi Master Replication Manager (MMM): installing monitoring node

Managing and using Multi Master Replication Manager (MMM)

High Availability with MySQL and Shared Storage

Introduction

Preparing a Linux server for shared storage

Configuring two servers for shared storage MySQL

Configuring MySQL on shared storage with Conga

Fencing for high availability

Configuring MySQL with GFS

High Availability with Block Level Replication

Introduction

Installing DRBD on two Linux servers

Manually moving services within a DRBD cluster

Using heartbeat for automatic failover

Performance Tuning

Introduction

Tuning the Linux kernel IO

Tuning MySQL Cluster storage nodes

Tuning MySQL Cluster SQL nodes

Tuning queries within a MySQL Cluster

Tuning GFS on shared storage

MySQL Replication tuning

Base Installation

LVM and MySQL

LVM and MySQL

Highly Available Architectures

Highly Available Architectures

Highly Available Architectures

Highly Available Architectures