Go to main content

Oracle® Solaris Cluster Data Service for MySQL Cluster Guide

Exit Print View

Updated: September 2015
 
 

Specifying Configuration Parameters for the MySQL Cluster ndb Daemon Resource

HA for MySQL Cluster provides a script that automates the process of configuring the MySQL Cluster ndb daemon resource. This script obtains configuration parameters from the mysql_ndbd_config file. A template for this file is in the /opt/SUNWscmys/ndbd/util directory. To specify configuration parameters for the MySQL Cluster ndb daemon resource, copy the mysql_ndbd_config file to another directory and edit this mysql_ndbd_config file.


Note -  This configuration file needs to be accessible from the global or local zone on each node where the MySQL Cluster is installed.

Each configuration parameter in the mysql_ndbd_config file is defined as a keyword-value pair. The mysql_ndbd_config file already contains the required keywords and equals signs. For more information, see mysql_ndbd_config File. When you edit the /myplace/mysql_ndbd_config file, add the required value to each keyword.

The keyword-value pairs in the mysql_ndbd_config file are listed in the following table.

Table 5  Keyword-Value Pairs in the mysql_ndbd_config File
Parameter
Description
Example
RS=ndb-daemon-resource
Specifies the name that you are assigning to the MySQL Cluster ndb daemon resource. You must specify a value for this keyword.
The name of the MySQL Cluster ndb daemon resource is ndb-rs.
RG=ndb-daemon-resource-group
Specifies the name of the resource group where the MySQL Cluster ndb daemon resource will reside. You must specify a value for this keyword.
The name of the MySQL Cluster ndb daemon resource group is ndb-rg.
HAS_RS=mgmd-resource,dependency-list
Specifies a comma-separated list of resources that the MySQL Cluster ndb daemon depends on. You must include the resource name of the MySQL Cluster management server resource here.
The MySQL Cluster ndb daemon resource depends on the management server resource mgm-rs. So the HAS_RS variable is set to mgm-rs.
RS_PROP=resource-property-string
Specifies a string that is formatted as -p property-value=value.
Additional standard and extension properties.
PARFILE=parameter-file
Specifies the name of the parameter file where the MySQL Cluster ndb daemon specific parameters of the MySQL Cluster ndb daemon resource are stored. This file is automatically created at registration time. You must specify a value for this keyword.
The parameter file is /pfile/ndbd-pfile, so the PARFILE variable is set to /pfile/ndbd-pfile.
BASEDIR=mysql-base-directory
Specifies the directory where MySQL Cluster is installed. A valid BASEDIR value specifies a directory which contains ndbd under bin or libexec.
MySQL Cluster is installed in /usr/local/mysql, so the value of BASEDIR is /usr/local/mysql.
USER=mgmd-user
Specifies the user under which the MySQL Cluster ndb daemon is started. If you do not specify any value, the MySQL Cluster management server is started as root.
The MySQL Cluster ndb daemon should be started under the root user, so the USER variable is empty.
TRY_RECONNECT=1
Specifies how often a connection to the MySQL Cluster management server should be retried before the attempt is abandoned. You must specify a value for this parameter.
If the first connection failure to a MySQL Cluster management server should lead to an abort, so the value of TRY_RECONNECT is 1.
CONNECT_STRING=mgm-connect-string
Specifies a valid connect string for the management servers in the format priv_nodename_1[:port], priv_nodename_2[:port].
The MySQL Cluster management servers are running on priv_node1 and priv_node2, so CONNECT STRING is set to priv_node1,priv_node2.
ID=ndb-server-id
Specifies the unique server ID for this ndb daemon. The value must match the entry in the management servers config.ini file. You must specify a value for this parameter.
The unique id on priv_node1 is 3 and the unique id on priv_node2 is 4. The clprivnet address on node 1 translates to priv_node1, so ID is set to 3.
The unique id on priv_node1 is 3 and the unique id on priv_node2 is 4. The clprivnet address on node 2 translates to priv_node2, so ID is set to 4.
MULTI_THREAD=multithreading-trigger
Any entry here triggers the start of the multithreaded version of the ndb daemon. Leaving this value undefined results in the start of the single-threaded ndb daemon.
The Multithreading trigger MULTI_THREAD is set to y.
DATA_DIR=ndb data directory
Specifies the directory where the my.cnf file and the data for the ndb daemon is stored. You must specify a value for this parameter.
The data directory for the ndb daemon is /ndbd-data, so DATA_DIR is set to /ndbd-data.
ERROR_ON_SHOW=error-code-for-failed-mgm- connections
Specifies the return code value for failed connections of the probe command to the management servers. The value should be less than or equal to 100 and follows the semantics for a SUNW.gds probe command. You must specify a value for this parameter.
The error code for failed management server connections is 25, so ERROR_ON_SHOW is set to 25.