Spec-Zone .ru
спецификации, руководства, описания, API

17.3.2.7. Defining SQL and Other API Nodes in a MySQL Cluster

The [mysqld] and [api] sections in the config.ini file define the behavior of the MySQL servers (SQL nodes) and other applications (API nodes) used to access cluster data. None of the parameters shown is required. If no computer or host name is provided, any host can use this SQL or API node.

Generally speaking, a [mysqld] section is used to indicate a MySQL server providing an SQL interface to the cluster, and an [api] section is used for applications other than mysqld processes accessing cluster data, but the two designations are actually synonymous; you can, for instance, list parameters for a MySQL server acting as an SQL node in an [api] section.

Note

For a discussion of MySQL server options for MySQL Cluster, see Section 17.3.4.2, "MySQL Server Options for MySQL Cluster"; for information about MySQL server system variables relating to MySQL Cluster, see Section 17.3.4.3, "MySQL Cluster System Variables".

You can obtain some information from a MySQL server running as a Cluster SQL node using SHOW STATUS in the mysql client, as shown here:

mysql> SHOW STATUS LIKE 'ndb%';+-----------------------------+---------------+| Variable_name               | Value         |+-----------------------------+---------------+| Ndb_cluster_node_id         | 5             || Ndb_config_from_host        | 192.168.0.112 || Ndb_config_from_port        | 1186          || Ndb_number_of_storage_nodes | 4             |+-----------------------------+---------------+4 rows in set (0.02 sec)

For information about these Cluster system status variables, see Section 5.1.6, "Server Status Variables".

Note

To add new SQL or API nodes to the configuration of a running MySQL Cluster, it is necessary to perform a rolling restart of all cluster nodes after adding new [mysqld] or [api] sections to the config.ini file (or files, if you are using more than one management server). This must be done before the new SQL or API nodes can connect to the cluster.

It is not necessary to perform any restart of the cluster if new SQL or API nodes can employ previously unused API slots in the cluster configuration to connect to the cluster.