Chapter 15. MySQL Cluster

MySQL 5.0

Chapter 15. MySQL Cluster

Table of Contents

15.1. MySQL Cluster Overview
15.2. Basic MySQL Cluster Concepts
15.2.1. MySQL Cluster Nodes, Node Groups, Replicas, and Partitions
15.3. Simple Multi-Computer How-To
15.3.1. Hardware, Software, and Networking
15.3.2. Multi-Computer Installation
15.3.3. Multi-Computer Configuration
15.3.4. Initial Startup
15.3.5. Loading Sample Data and Performing Queries
15.3.6. Safe Shutdown and Restart
15.4. MySQL Cluster Configuration
15.4.1. Building MySQL Cluster from Source Code
15.4.2. Installing the Software
15.4.3. Quick Test Setup of MySQL Cluster
15.4.4. Configuration File
15.4.5. Overview of Cluster Configuration Parameters
15.4.6. Configuring Parameters for Local Checkpoints
15.5. Upgrading and Downgrading MySQL Cluster
15.5.1. Performing a Rolling Restart of the Cluster
15.5.2. Cluster Upgrade and Downgrade Compatibility
15.6. Process Management in MySQL Cluster
15.6.1. MySQL Server Process Usage for MySQL Cluster
15.6.2. ndbd, the Storage Engine Node Process
15.6.3. ndb_mgmd, the Management Server Process
15.6.4. ndb_mgm, the Management Client Process
15.6.5. Command Options for MySQL Cluster Processes
15.7. Management of MySQL Cluster
15.7.1. MySQL Cluster Startup Phases
15.7.2. Commands in the Management Client
15.7.3. Event Reports Generated in MySQL Cluster
15.7.4. Single-User Mode
15.8. On-line Backup of MySQL Cluster
15.8.1. Cluster Backup Concepts
15.8.2. Using The Management Client to Create a Backup
15.8.3. How to Restore a Cluster Backup
15.8.4. Configuration for Cluster Backup
15.8.5. Backup Troubleshooting
15.9. Using High-Speed Interconnects with MySQL Cluster
15.9.1. Configuring MySQL Cluster to use SCI Sockets
15.9.2. Understanding the Impact of Cluster Interconnects
15.10. Known Limitations of MySQL Cluster
15.11. MySQL Cluster Development Roadmap
15.11.1. MySQL Cluster Changes in MySQL 5.0
15.11.2. MySQL 5.1 Development Roadmap for MySQL Cluster
15.12. MySQL Cluster FAQ
15.13. MySQL Cluster Glossary

MySQL Cluster is a high-availability, high-redundancy version of MySQL adapted for the distributed computing environment. It uses the storage engine to enable running several MySQL servers in a cluster. This storage engine is available in MySQL 5.0 binary releases and in RPMs compatible with most modern Linux distributions. (If you install using RPM files, note that both the and RPMs must be installed to have MySQL Cluster capability.)

The operating systems on which MySQL Cluster is currently available are Linux, Mac OS X, and Solaris. (Some users have reported success with running MySQL Cluster on FreeBSD and HP-UX, although these platforms are not yet officially supported by MySQL AB.) We are working to make Cluster run on all operating systems supported by MySQL, including Windows, and will update this page as new platforms are supported.

This chapter represents a work in progress, and its contents are subject to revision as MySQL Cluster continues to evolve. Additional information regarding MySQL Cluster can be found on the MySQL AB Web site at http://www.mysql.com/products/cluster/.

Additional resources

15.1. MySQL Cluster Overview

MySQL Cluster is a technology that enables clustering of in-memory databases in a shared-nothing system. The shared-nothing architecture allows the system to work with very inexpensive hardware, and without any specific requirements on hardware or software. It also does not have any single point of failure because each component has its own memory and disk.

MySQL Cluster integrates the standard MySQL server with an in-memory clustered storage engine called . In our documentation, the term refers to the part of the setup that is specific to the storage engine, whereas “MySQL Cluster” refers to the combination of MySQL and the storage engine.

A MySQL Cluster consists of a set of computers, each running a number of processes including MySQL servers, data nodes for NDB Cluster, management servers, and (possibly) specialized data access programs. The relationship of these components in a cluster is shown here:

MySQL Cluster Components

All these programs work together to form a MySQL Cluster. When data is stored in the storage engine, the tables are stored in the data nodes. Such tables are directly accessible from all other MySQL servers in the cluster. Thus, in a payroll application storing data in a cluster, if one application updates the salary of an employee, all other MySQL servers that query this data can see this change immediately.

The data stored in the data nodes for MySQL Cluster can be mirrored; the cluster can handle failures of individual data nodes with no other impact than that a small number of transactions are aborted due to losing the transaction state. Because transactional applications are expected to handle transaction failure, this should not be a source of problems.