JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Data Service for MySQL Cluster Guide     Oracle Solaris Cluster 4.1
search filter icon
search icon

Document Information

Preface

1.  Installing and Configuring HA for MySQL Cluster

HA for MySQL Cluster Overview

Overview of Installing and Configuring HA for MySQL Cluster

Planning the HA for MySQL Cluster Installation and Configuration

MySQL Cluster and Oracle Solaris Containers

Oracle Solaris Cluster HA for MySQL Cluster Components

Configuration Restrictions

Configuration Requirements

Dependencies Between HA for MySQL Cluster Components

Configuration Recommendations

Installing and Configuring MySQL Cluster

How to Enable a MySQL Cluster Database to Run in a Global Zone Configuration

How to Install and Configure MySQL Cluster in a Global Zone

Verifying the Installation and Configuration of MySQL Cluster

How to Verify the Installation and Configuration of MySQL Cluster

Installing the HA for MySQL Cluster Package

How to Install the HA for MySQL Cluster Package

Registering and Configuring HA for MySQL Cluster

Specifying Configuration Parameters for the MySQL Cluster Management Server Resource

How to Create and Enable Resources for MySQL Cluster Management Server

Specifying Configuration Parameters for the MySQL Cluster ndb Daemon Resource

How to Create and Enable Resources for the MySQL Cluster ndb Daemon

Specifying Configuration Parameters for the MySQL Cluster ndb Shutdown Controller Resource

How to Create and Enable Resources for MySQL Cluster ndb Shutdown Controller

How to Suspend the ndb Shutdown Controller's Stop Action

How to Create and Enable Resources for the MySQL Server

Verifying the HA for MySQL Cluster Installation and Configuration

How to Verify the HA for MySQL Cluster Installation and Configuration

Tuning the HA for MySQL Cluster Fault Monitor

Operation of the HA for MySQL Cluster Management Server Parameter File

Operation of the HA for MySQL Cluster ndb Daemon Parameter File

Operation of the Fault Monitor for HA for MySQL Cluster Management Server

Operation of the Fault Monitor for HA for MySQL Cluster ndb Daemon

Debugging HA for MySQL Cluster

How to Activate Debugging for HA for MySQL Cluster

A.  Files for Configuring HA for MySQL Cluster

B.  Deployment Example: Installing MySQL Cluster in the Global Zone

Index

Installing and Configuring MySQL Cluster

This section explains the special requirements for installing MySQL Cluster for use with HA for MySQL Cluster. For complete information about installing and configuring MySQL Cluster, see http://www.mysql.com/.

The MySQL version delivered with the Oracle Solaris OS is a pure MySQL server version. It does not include MySQL Cluster. You must obtain MySQL Cluster software from http://www.mysql.com/.

Determine whether you have to configure HA for MySQL Cluster to run in a global zone or a zone cluster configuration.

To install and configure MySQL Cluster in a global zone configuration or in a zone-cluster configuration, complete the following tasks:

How to Enable a MySQL Cluster Database to Run in a Global Zone Configuration

For a complete example of deploying in a global zone, see Appendix B, Deployment Example: Installing MySQL Cluster in the Global Zone.

  1. (Optional) Adjust the heartbeat_quantum and the heartbeat_timeout parameter if appropriate.
    # cluster set -p heartbeat_quantum=50%-of-heartbeat-timeout \
    -p heartbeat-timeout=value-in-milliseconds
  2. (Optional) If you want to configure MySQL Cluster in a zone cluster, log in to the target zone.
    # zlogin zone-name
  3. As superuser in the target zone register the SUNW.gds resource types.
    # clresourcetype register SUNW.gds
  4. (Optional) Create a failover resource group to contain the shared-address resource.
    # clresourcegroup create Shared-Address-resource-group
  5. (Optional) Create the shared-address resource.
    # clressharedaddress create -g Shared-Address-resource-group Shared-Address-resource
  6. (Optional) Enable the shared-address resource group.
    # clresourcegroup online -eM Shared-Address-resource-group
  7. Create the management server resource group.
    # clresourcegroup create -p maximum_primaries=2 -p desired_primaries=2 \
    mgmd-resource-group
  8. Create the ndbd daemon resource group.
    # clresourcegroup create -p maximum_primaries=2 -p desired_primaries=2 \
    ndbd-resource-group
  9. Create the MySQL server resource group.
    # clresourcegroup create -p maximum_primaries=2 -p desired_primaries=2 \
    mysql-resource-group
  10. (Optional) Set the affinities for the MySQL server resource group.
    # clresourcegroup set -p rg_affinities=++ndbd-resource-group mysql-resource-group

How to Install and Configure MySQL Cluster in a Global Zone

Before You Begin

Ensure that the Oracle Solaris Cluster HA for MySQL package (ha-cluster/data-service/mysql) is installed during your initial Oracle Solaris Cluster installation, if not then proceed to Installing the HA for MySQL Cluster Package to install it on your cluster. Return here to continue Installing and Configuring MySQL Cluster.


Note - For complete information about installing MySQL Cluster, go to http://www.mysql.com/.


For a complete example of deployment in a global zone, see Appendix B, Deployment Example: Installing MySQL Cluster in the Global Zone.

The sample commands in this task assume the following values:

  1. Install the MySQL Cluster binaries on all nodes.
    # cd dir-path
    # /usr/sfw/bin/gtar xzvf downloaded-MySQL-Cluster-version
    # ln -s ./created-dir ./mysql
  2. Create the MySQL user and group on all nodes.
    # groupadd -g 1000 mysql
    # useradd -u 1000 -g 1000 -d /local/mysql -s /bin/sh mysql
  3. Change the owner of the MySQL Cluster on all nodes.
    # chown -RL mysql:mysql ./mysql
  4. Create the data directory for the management server on all nodes to host the management server.
    # mkdir MySQL-Cluster-management-server-data-directory
  5. Create the MySQL Cluster management server config.ini file according to your requirements.

    The Oracle Solaris Cluster HA for MySQL data service provides a sample config.ini file for the MySQL Cluster management server.

    The contents of /opt/SUNWscmys/ndb_mgmd/etc/config.ini_sample provides a sample MySQL Cluster configuration file that you can use to create your MySQL Cluster instance MySQL Cluster Management Server Datadirectory/config.ini. You must still edit that file to reflect your configuration values.

    # cp /opt/SUNWscmys/ndb_mgmd/etc/config.ini_sample \
    MySQL-Cluster-Management-Server-Data-Directory/config.ini
  6. Create the MySQL Cluster ndb daemon my.cnf file.

    The Oracle Solaris Cluster HA for MySQL data service provides a sample my.cnf file for the MySQL Cluster ndb daemon.

    The content of /opt/SUNWscmys/ndbd/etc/my.cnf_sample provides a sample MySQL Cluster configuration file for the ndb daemons, that you can use to create your MySQL Cluster instance MySQL Cluster ndb Daemon Datadirectory/my.cnf. You must still edit that file to reflect your configuration values.

    # cp /opt/SUNWscmys/ndbd/etc/my.cnf_sample \
    MySQL-Cluster-ndb-Daemon-Data-Directory/my.cnf
  7. Install a MySQL server on all nodes to host the MySQL server.

    Refer to Oracle Solaris Cluster Data Service for MySQL Guide. As an alternative, you can refer to Appendix B, Deployment Example: Installing MySQL Cluster in the Global Zone


    Note - Make sure to stop the installation process after bootstrapping the MySQL database and changing the file permissions. If you want to use a sample configuration file for your MySQL server configuration, use /opt/SUNWscmys/etc/my.cnf_sample_mysqld_cluster. You must still edit that file to reflect your configuration values.