Go to main content

Oracle® Solaris Cluster Data Service for MySQL Guide

Exit Print View

Updated: June 2017
 
 

Enabling MySQL to Run in a Zone Configuration

Determine whether to install MySQL in a failover, scalable, or multiple-master configuration and follow the appropriate procedure:

How to Enable MySQL for a Failover Resource

  1. On one of the nodes in the cluster that will host MySQL, become an administrator that provides solaris.cluster.admin authorization.
  2. Create and boot your zones MySQL-zone on all the nodes to host your MySQL database.
  3. Register the SUNW.gds and SUNW.HAStoragePlus resource type.
    # clresourcetype register SUNW.gds SUNW.HAStoragePlus
  4. Create a failover resource group.
    # clresourcegroup create \
    -n node1,node2 \
    MySQL-failover-resource-group
  5. Create a resource for the MySQL disk storage.
    # clresource create \
    -g MySQL-failover-resource-group \
    -t SUNW.HAStoragePlus \
    -p FilesystemMountPoints=MySQL-instance-mount-points \
    MySQL-has-resource
  6. Create a resource for the MySQL logical hostname.
    # clreslogicalhostname \
    -g MySQL-failover-resource-group \
    -h MySQL-logical-hostname \
    MySQL-lh-resource
  7. Enable the failover resource group that now includes the MySQL disk storage and logical hostname resources.
    # clresourcegroup online -M -n current-node MySQL-failover-resource-group

How to Enable MySQL to Run in a Scalable Configuration

  1. On one of the nodes in the cluster that will host MySQL, become an administrator that provides solaris.cluster.admin authorization.
  2. Register the SUNW.gds resource type.
    # clresourcetype register SUNW.gds
  3. Create and boot your zones MySQL-zone on all the nodes to host your MySQL database.
  4. Create a failover resource group.
    # clresourcegroup create -n node1,node2 MySQL-failover-resourcegroup
  5. Create the shared address resource.
    # clressharedaddress create \
    -g SharedAddress-failover-resource-group \
    -h MySQL-logical-hostname \
    MySQL-lh-resource
  6. Enable the failover resource group that now includes the shared address resources.
    # clresourcegroup online -M -n current-node MySQL-failover-resource-group
  7. Create a resource group to run on at minimum two nodes.
    # clresourcegroup create -p Maximum_primaries=2 \
    -p desired_primaries=2 \
    -n node1,node2 \
    MySQL-scalable-resource-group

How to Enable MySQL to Run in a Multiple-Master Configuration

  1. Become an administrator that provides solaris.cluster.admin authorization.
  2. On one of the nodes in the cluster that will host MySQL, register the SUNW.gds resource type.
    # clresourcetype register SUNW.gds
  3. Create a resource group to run on at least two nodes.
    # clresourcegroup create \
    -p Maximum_primaries=2 \
    -p desired_primaries=2 -n node1,node2 \
    MySQL-scalable-resource-group