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


5.2.6 Thecreate site Command

create site {--hosts=|-h }host_listsite_namehost_list:host[,host[,...]]

Thecreate site command is used to create a MySQL Cluster Manager management site; that is, a set of MySQL Cluster Manager management agents running on one or more host computers. The command requires a list of one or more hosts where management agents are running and a name for the site. The host list is passed as the value of the--hosts option (short form:-h).

This is an example of acreate site command that creates a site namedmysite, consisting of the hoststonfisk andflundra:

mcm> create site --hosts=tonfisk,flundra mysite;+---------------------------+| Command result            |+---------------------------+| Site created successfully |+---------------------------+1 row in set (0.31 sec)
Tip

You can verify that the site was created as intended, using thelist sites command, as shown here:

mcm> list sites;+--------+------+-------+-----------------+| Site   | Port | Local | Hosts           |+--------+------+-------+-----------------+| mysite | 1862 | Local | tonfisk,flundra |+--------+------+-------+-----------------+1 row in set (0.06 sec)

(SeeSection 5.2.8, “Thelist sites Command”, for more information about this command.)

Agents must be running on all hosts specified in the--hosts option whencreate site is executed; otherwise, the command fails with the errorAgent on hosthost:port is unavailable. The host where the agent used to issue the command is running must be one of the hosts listed. Otherwise, the command fails with the errorHosthost_name is not a member of sitesite_name.

Warning

Moreover, if the client and the agent it is connected to are on the same host, that host must be included in the host list using its host name or its own loopback address (which can be something other than 127.0.0.1 on some systems); otherwise, the cluster might become not restartable in the future.

A given agent may be a member of one site only; if one of the management agents specified in thehost_list already belongs to a site, the command fails with the errorHosthost is already a member of sitesite.

Notes
  • Usinglocalhost as the argument for the--hosts option will result in the creation of a single-host site (consisting of the host on which the command is run) that cannot be scaled up later by theadd hosts command. Also notice that you cannot mixlocalhost with other host names in the host list. Therefore, it is recommended that you use IP addresses (but not any addresses belonging to thelocalhost subnet 127.*.*.*) or proper host names in the list.

  • 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. SeeSection 6.1, “MySQL Cluster Manager Usage and Design Limitations”.