This section covers the commands used in the MySQL Cluster Manager for getting and setting values of various types used in MySQL Cluster configuration. We begin with a discussion of what we mean by the term “configuration attribute”, and how this relates to the manual configuration of a MySQL Cluster using MySQL Cluster configuration parameters and MySQL Server options and variables that you may already be familiar with.
Configuration parameters set in the
MySQL Cluster global configuration file read by the management
server (or servers), by convention named
Configuration options passed to MySQL Cluster executable programs when invoking them
MySQL Cluster Manager simplifies this configuration scheme by treating all 3 types of configuration data as attributes, where the term “attribute” refers to a MySQL Cluster configuration parameter, a MySQL Server variable, or a command-line option used with one or more MySQL Cluster binary programs. It does this transparently, handling all necessary changes in a unified interface.
Suppose that you wish to know how much data memory is allocated to
the data nodes in a given MySQL Cluster. Rather than having to
determine that this is controlled using the
parameter that is written in the
file and then reading that file to find the value, you merely
invoke the MySQL Cluster Manager
get command, and
MySQL Cluster Manager handles reading from the file for you, and displays the
value without the necessity of opening the file in a separate
application such as more or
less. If you wish to change the
amount of data memory allocated to the data nodes, you can issue a
MySQL Cluster Manager
reset) command; MySQL Cluster Manager then writes
the desired value to
is the case with
a configuration value in a running MySQL Cluster requires a
rolling restart to be performed, MySQL Cluster Manager can perform this operation
automatically so that the configuration change takes effect
without further intervention required on the part of the operator.
Process: This value is used for all instances of a given type of MySQL Cluster process.
Instance: This value is used for a specific instance of a MySQL Cluster process, the instance being identified by its MySQL Cluster node ID.
Default values are hard-coded into MySQL Cluster; you can override
a default value for a given configuration attribute (using the
set command) or reset a given
attribute value to its default (using the
reset command), but you cannot
change a default value itself. You can set or reset an
configuration attribute's value on either the process level
or the instance level using a single
reset command. Once you have set
or reset the value of a configuration attribute, this value
persists until it is changed by executing another
When setting or resetting a configuration attribute value, you must specify the level at which the setting applies.
MySQL Cluster Manager determines what value to use for a configuration attribute relating to a given process by following these steps for each MySQL Cluster process:
(For each configuration attribute:)
Is an attribute value defined for the node ID of this process?
Yes: Use the value that was defined for this node ID, and exit.
No: Proceed to the next step.
Is an attribute value specified on the process level, that is, for all processes of this type?
Yes: Use the value that was specified for all processes of this type, and exit.
No: Use the default value that applies to processes of this type, and exit.
(In the steps just shown, “exit” can be taken to mean “If there are more configuration attributes applicable to this process that have not yet been set, proceed to the next attribute until there are no more attributes to be set for this process”.)
The most recently specified value takes precedence. This means that if you set a configuration attribute for a specific process, then later specify a process-level value for this attribute, the process-level value is used for all processes of that type, including the instance for which you earlier set an instance-specific value.
Mandatory attributes. Some attributes must be defined in the MySQL Cluster Manager at the process type or instance level for all processes of the applicable type or types for the cluster configuration to be valid. Such mandatory attributes may be changed, but not reset; in other words, the definition can be changed, but the definition itself cannot be removed entirely. Another way of stating this is that a mandatory attribute has no default value.
An example of a mandatory attribute is
If you try to reset a mandatory attribute, the attempt fails with
an error, as shown here:
reset NodeId:ndb_mgmd:1 mycluster;ERROR 6007 (00MGR): Config attribute NodeId is mandatory and cannot be reset mcm>
reset NodeId:ndbd:2 mycluster;ERROR 6007 (00MGR): Config attribute NodeId is mandatory and cannot be reset mcm>
reset NodeId:mysqld:4 mycluster;ERROR 6007 (00MGR): Config attribute NodeId is mandatory and cannot be reset
Read-only attributes. A read-only attribute is an attribute that must be defined by the MySQL Cluster Manager when a cluster is created. A read-only attribute can be neither changed nor reset by the user. This means that a read-only attribute is always a mandatory attribute.
One such attribute is
HostName, which is read
only for any type of MySQL Cluster process. Any attempt to change
or reset a read-only attribute fails, as shown here:
reset HostName:ndb_mgmd mycluster;ERROR 6008 (00MGR): Config attribute HostName is readonly and cannot be changed mcm>
reset HostName:ndbd mycluster;ERROR 6008 (00MGR): Config attribute HostName is readonly and cannot be changed mcm>
reset HostName:mysqld mycluster;ERROR 6008 (00MGR): Config attribute HostName is readonly and cannot be changed mcm>
set HostName:ndb_mgmd mycluster;ERROR 6008 (00MGR): Config attribute HostName is readonly and cannot be changed mcm>
set HostName:ndbd mycluster;ERROR 6008 (00MGR): Config attribute HostName is readonly and cannot be changed mcm>
set HostName:mysqld mycluster;ERROR 6008 (00MGR): Config attribute HostName is readonly and cannot be changed
An attribute that is mandatory or read only is set when a cluster
is created. Neither a mandatory attribute nor a read-only
attribute can be reset. (Neither type of attribute has a default
value other than what is set for it when the cluster is created.)
A mandatory attribute can be changed at any time by the user; a
read-only attribute cannot be changed once the cluster has been
created. You can obtain a listing of mandatory and read-only
attributes using the
A listing of attribute properties also can be found in the output of ndb_config --configinfo --xml (see ndb_config — Extract MySQL Cluster Configuration Information); for more complete information, see Configuration of MySQL Cluster.
MySQL Cluster Manager determines internally which attributes are considered
read-only for reasons of cluster stability and performance. You
can use the
get command to see
which attributes are read only.