To start the MySQL Cluster Manager agent on a given host running a Linux or similar operating system, you should runmcmd, found in thebin directory within the manager installation directory on that host. Typical options used withmcmd are shown here:
mcmd [--config=filename | --bootstrap]SeeSection 4.1, “mcmd, the MySQL Cluster Manager Agent”, for information about additional options that can be used when invokingmcmd from the command line, or in a configuration file.
mcmd normally runs in the foreground. If you wish, you can use your platform's usual mechanism for backgrounding a process. On a Linux system, you can do this by appending an ampersand character (&), like this (not including any options that might be required):
$> ./bin/mcmd & By default, the agent assumes that the agent configuration file ismcmd.conf in the MySQL Cluster Manager installation directory (seeSection 3.4, “MySQL Cluster Manager Configuration File” for more details). You can tell the agent to use a different configuration file by passing the path to this file to the--config option, as shown here:
$> ./bin/mcmd --config=/home/mcm/mcm-agent.conf The--bootstrap option causes the agent to start with default configuration values, create a default one-machine cluster namedmycluster, and start it. This option works only if no sites have been created yet.
The use of the--bootstrap option withmcmd is shown here on a system having the host nametorsk, where MySQL Cluster Manager has been installed to/home/jon/mcm:
$> ./mcmd --bootstraplogging facility initialized, switching logging to loggers specified in configurationMySQL Cluster Manager 8.4.6 (64bit) startedConnect to MySQL Cluster Manager by running "/home/clusteradmin/mcm8.4.6/bin/mcm" -h torsk -P 1862Configuring default cluster 'mycluster'...Setting default_storage_engine to ndbcluster...Starting default cluster 'mycluster' version '8.4.6-cluster'...Cluster 'mycluster' started successfullyndb_mgmd torsk:1186ndbmtdtorskndbmtdtorskmysqldtorsk:3306mysqldtorsk:3307ndbapi*Connect to the database by running "/home/clusteradmin/cluster/bin/mysql" -h 127.0.0.1 -P 3306 -u rootYou can then connect to the agent using themcm client (seeSection 4.3, “Starting the MySQL Cluster Manager Client”), and to either of the MySQL Servers running on ports 3306 and 3307 usingmysql or another MySQL client application.
SeeSection 4.1, “mcmd, the MySQL Cluster Manager Agent”, for more information about options that can be used withmcmd.
The MySQL Cluster Manager agent must be started on each host in the MySQL NDB Cluster to be managed.
To stop one or more instances of the MySQL Cluster Manager agent, use thestop agents command in the MySQL Cluster Manager client. If the client is unavailable, you can stop each agent process using the system's standard method for doing so, such as^C orkill.
You can also set the agent up as a daemon or service on Linux and other Unix-like systems. (SeeSection 3.3.1, “Installing MySQL Cluster Manager on Unix-like Platforms”.) If you also want data node failed processes from a running MySQL NDB Cluster to be started when the agent fails and restarts in such cases, you must make sure thatStopOnError is set to 0 on each data node (and not to 1, the default).