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

A.  Files for Configuring HA for MySQL Cluster

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

Target Cluster Configuration

Software Configuration

How to Install MySQL Cluster Software

Setting up the MySQL Cluster Control

How to Configure the Management Server on Both Nodes

How to Configure the Data Nodes on Both Nodes

How to Initialize the MySQL Server

How to Create the HA for MySQL Cluster Configuration With Scalable Services

Example Configuration Files for Installation in the Global Zone

config.ini File for Both Nodes to Store in /mgm-data

my.cnf File for the Data Nodes to Store in /ndbd-data

my.cnf File for the First SQL Node phys-schost-1 to Store in /mysql-data

my.cnf File for the Second SQL Node phys-schost-2 to Store in /mysql-data

mysql_config File for the First SQL Node phys-schost-1 to Store in /temp/cluconfig

mysql_config File for the Second SQL Node phys-schost-2 to Store in /temp/cluconfig

mysql_ndb_mgmd_config File for the First Node phys-schost-1

mysql_ndb_mgmd_config File for the Second Node phys-schost-2

mysql_ndbd_config File for the First Node phys-schost-2

mysql_ndbd_config File for the Second Node phys-schost-2

ndbd_shutdown_config File for One Node

ha_mysql_config File for One Node

Index

How to Configure the Management Server on Both Nodes

  1. Create the configuration.
    1. On both nodes, create the data directory for the management server.
      phys-schost-1:/ # mkdir /mgm-data
      phys-schost-2:/ # mkdir /mgm-data
    2. On both nodes, copy the config.ini file from /temp/cluconfig to the mgm-data directory.
      phys-schost-1:/ # cp /temp/cluconfig/config.ini /mgm-data
      phys-schost-2:/ # cp /temp/cluconfig/config.ini /mgm-data
    3. Modify the config.ini file from /temp/cluconfig.

      Alternatively, copy the content from config.ini File for Both Nodes to Store in /mgm-data and overwrite the copied file.

      The configuration in the config.ini file for this example is shown in the following table:


      Server ID
      Node Type
      Global-Cluster Node to Run On
      Private Net Alias
      1
      Management node
      phys-schost-1
      2
      Management node
      phys-schost-2
      3
      Date node
      phys-schost-1
      phys-schost-1-p
      4
      Date node
      phys-schost-2
      phys-schost-2-p
      7
      SQL node
      phys-schost-1
      8
      SQL node
      phys-schost-2
    4. Configure the data nodes to communicate over the private interconnect clprivnet addresses.

      Create aliases in the /etc/hosts table for the clprivnet addresses and use them in the config.inifile as the host names.

    5. Set Arbitration=WaitExternal and an appropriate value for ArbitrationTimeout in the config.inifile.
  2. On one node, set the heartbeat timeouts for Oracle Solaris Cluster software.
    phys-schost-1:/ # cluster set -p heartbeat_quantum=500 -p heartbeat_timeout=5000

    Note - The heartbeat timeout must be half of the ArbitrationTimeout in the config.inifile.


  3. Start the management server.
    phys-schost-1:/ # cd /mgm-data
    phys-schost-2:/ # cd /mgm-data
    
    phys-schost-1:/mgm-data # /usr/local/mysql/bin/ndb_mgmd \
    > --configdir=/mgm-data -f /mgm-data/config.ini \
    --ndb-nodeid=1
    phys-schost-2:/mgm-data # /usr/local/mysql/bin/ndb_mgmd \
    > --configdir=/mgm-data -f /mgm-data/config.ini \
    --ndb-nodeid=2
  4. Verify that the management server is running.

    Run the ndb_mgm show command on both nodes until the data nodes are connected to the management server.

    phys-schost-1:/mgm-data # /usr/local/mysql/bin/ndb_mgm \
    > --ndb-connectstring=phys-schost-1-p,phys-schost-2-p -e show
    phys-schost-2:/mgm-data # /usr/local/mysql/bin/ndb_mgm \
    > --ndb-connectstring=phys-schost-2-p,phys-schost-1-p -e show