Documentation Home
MySQL Cluster Manager 1.4 User Manual
Related Documentation Download this Manual
PDF (US Ltr) - 1.8Mb
PDF (A4) - 1.8Mb


4.2.1 The add hosts Command

add hosts {--hosts=|-h }host_list site_name

host_list:
    host[, host[, ...]]

This command adds one or more hosts to an existing management site. Agents using the same port as the management site must be running on any hosts added using this command. This command takes two mandatory arguments: a list of hosts (using the --hosts option or its short form -h), and the name of the site to which the hosts are to be added.

The --hosts takes a comma-separated list of one or more hosts to be added to the site.

For example, the following command adds two hosts named torsk and kolja to management site mysite:

mcm> add hosts --hosts=torsk,kolja mysite;
+--------------------------+
| Command result           |
+--------------------------+
| Hosts added successfully |
+--------------------------+
1 row in set (0.48 sec)

None of the hosts added by this command may already be members of management site site_name. Do not attempt to add again a host that is already a member of the management site using its secondary (or alternate) IP address—the mcmd process on the host is already bound to the IP address that was supplied when the host was first added, and it cannot be bound again to another IP address.

Notes
  • This command does not support the --force option.

  • Do not use localhost in the host list, as MySQL Cluster Manager relies on the operating system for host name resolution, and localhost might be resolved differently on different systems. Use proper host names for the host list or, preferably, use the IP addresses for the hosts instead.

  • When IPv6-enabled Windows systems are used as MySQL NDB Cluster hosts under MySQL Cluster Manager, you must reference these hosts using IPv4 addresses. Otherwise, MySQL Cluster Manager will be unable to connect to the agent processes on those hosts. See Section 5.1, “MySQL Cluster Manager Usage and Design Limitations”.