It’s important to know how can we start and stop the entire MySQL cluster. In an earlier post, we have seen how to start/stop individual nodes on the MySQL Cluster without restarting the MySQL cluster itself.
Traditional Start and Stop
It is necessary to start each node in the cluster separately, in the following order:
- Start the management node with the ndb_mgmd command
- Start each data node with the ndbd command and option –nostart
- Start each MySQL server (SQL node) using: mysqld_safe –user=mysql &
Each of these commands must be run from a system shell on the machine housing the affected node. You can verify the cluster is running by starting the MGM management client ndb_mgm on the machine housing the MGM node. Starting individual nodes can be done using the MGM management client start command:
mgm> 2 START
or if starting more than a specific node:
mgm> ALL START
To stop the server, use the MGM management client and use one of the commands:
mgm> 2 STOP /* for individual node */ mgm> ALL STOP /* stop all data nodes */ mgm> SHUTDOWN /* stop the whole cluster */
Using MySQL Cluster Manager
The new MySQL Cluster Manager software allows the cluster to be configured and managed in a more user friendly way. To get a cluster up and going using the manager, the following steps should be taken:
- Install the MySQL Cluster Manager Agent on each of the different nodes.
- Download the cluster software package and make it available on each of the nodes.
- Create a site definition to manage the server and details.
- Create a package definition to manage the cluster software version.
- Create a cluster definition to manage the cluster and the nodes.
- Define the configuration settings for the cluster.
- Issue the start cluster command.
To stop the cluster, issue the command in MySQL Cluster Manager:
mcm> stop cluster mycluster;