1 Introduction
This document describes operation instructions on MySQL NDB Cluster.
1.1 Prerequisites
This section describes the prerequisites, which must be fulfilled before using the procedure.
1.1.1 Documents
Before starting this procedure, ensure that the following web site and document are available:
1.1.2 Tools
Not applicable.
1.1.3 Conditions
Before starting this procedure, the following conditions must apply:
- IPWorks has been installed.
- The operator has logged on to SC-1 or SC-2.
1.2 Relation Information
Trademark information, typographic conventions, and definition and explanation of abbreviations and terminology can be found in the following documents:
2 MySQL NDB Cluster Configuration
For conceptual information (such as, MySQL files location) about the MySQL database, refer to the Section MySQL Database Management in IPWorks Configuration Management.
The configuration of MySQL NDB Cluster contains the following topics:
- Managing MySQL NDB Cluster
- Managing Management Node
- Managing Data Node
- Managing SQL Node
- Starting MySQL CLI on MySQL NDB Cluster
- Showing Status of NDB Cluster
2.1 Managing MySQL NDB Cluster
The following table lists the commands to manage the MySQL NDB Cluster:
|
Operations |
Commands |
|---|---|
|
Start all the nodes in the cluster |
# /etc/init.d/ipworks.mysql start-ndbcluster |
|
Stop all the nodes in the cluster |
# /etc/init.d/ipworks.mysql stop-ndbcluster |
(1) Execute this command on one SC to start all the
nodes ( Management Nodes, SQL Nodes, and Data Nodes) on both SCs.
(2) Execute this command on one SC to stop all the nodes
( Management Nodes, SQL Nodes, and Data Nodes) on both SCs.
2.2 Managing Management Node
The Management Node manages the configuration of the other nodes in the cluster, so user must start it before starting the other nodes and stop it after stopping the other nodes.
- Note:
- When OS is rebooting, MySQL Cluster is started up automatically. However, depending on the size of database, it might take some time.
The configuration file of the Management Node is located in /etc/ipworks/mysql/confs/ipworks_mgm.conf.
The following table lists the commands to manage the Management Node:
|
Operations |
Commands |
|---|---|
|
Start the Management Node |
# /etc/init.d/ipworks.mysql start-mgmd |
|
Stop the Management Node |
# /etc/init.d/ipworks.mysql stop-mgmd |
(1) Only the Management Node on the machine where the
command is executed will be started.
(2) Only the Management Node on the machine where the
command is executed will be stopped.
2.3 Managing Data Node
The following table lists the commands to manage the Data Node:
- Note:
- Make sure that the Management Nodes (both on SC-1- and SC-2) are started before starting the Data Node.
|
Operations |
Commands |
|---|---|
|
Start the Data Node |
# /etc/init.d/ipworks.mysql start-ndbd When it is the first time to start the Data Node, use the following command instead to perform an initialization: After the following command is executed, all the IPWorks data will be initialized. # /etc/init.d/ipworks.mysql start-ndbd-initial |
|
Stop the Data Node |
# /etc/init.d/ipworks.mysql stop-ndbd |
(1) The command takes at least 10 minutes. And the time
it takes to perform the command depends on the data size.
2.4 Managing SQL Node
The following table lists the commands to manage the SQL Node:
- Note:
- Make sure that the Management Nodes (both on SC-1 and SC-2) and Data Nodes are started before starting the SQL Node.
|
Operations |
Commands |
|---|---|
|
Start the SQL Node |
# /etc/init.d/ipworks.mysql start-sqlnode |
|
Stop the SQL Node |
# /etc/init.d/ipworks.mysql stop-sqlnode |
2.5 Using MySQL CLI
The following table lists the commands to start MySQL CLI on MySQL Cluster:
|
Operations |
Commands |
|---|---|
# /usr/local/mysql/bin/mysql \ --protocol=tcp -P 3307 -h ipw_sql | |
|
Show the number of IPWorks related tables |
# /usr/local/mysql/bin/\ ndb_show_tables |grep ipworks|\ grep UserTable|grep -v BLOB|wc -l |
2.6 Showing Status of MySQL NDB Cluster
To show the status of MySQL NDB Cluster, execute the following command:
# /etc/init.d/ipworks.mysql show-status |
The following example indicates that all the Management Nodes, Data Nodes, and SQL Nodes are running.
Connected to Management Server at: localhost:1186 Cluster Configuration --------------------- [ndbd(NDB)] 2 node(s) id=27 @169.254.100.1 (mysql-5.6.31 ndb-7.4.12, Nodegroup: 0, *) id=28 @169.254.100.2 (mysql-5.6.31 ndb-7.4.12, Nodegroup: 0) [ndb_mgmd(MGM)] 2 node(s) id=1 @169.254.100.1 (mysql-5.6.31 ndb-7.4.12) id=2 @169.254.100.2 (mysql-5.6.31 ndb-7.4.12) [mysqld(API)] 24 node(s) id=3 @169.254.100.1 (mysql-5.6.31 ndb-7.4.12) id=4 (not connected, accepting connect from SC-2) id=5 (not connected, accepting connect from any host) id=6 (not connected, accepting connect from any host) id=7 (not connected, accepting connect from any host) id=8 (not connected, accepting connect from any host) id=9 (not connected, accepting connect from any host) id=10 (not connected, accepting connect from any host) id=11 (not connected, accepting connect from any host) id=12 (not connected, accepting connect from any host) id=13 (not connected, accepting connect from any host) id=14 (not connected, accepting connect from any host) id=15 (not connected, accepting connect from any host) id=16 (not connected, accepting connect from any host) id=17 (not connected, accepting connect from any host) id=18 (not connected, accepting connect from any host) id=19 (not connected, accepting connect from any host) id=20 (not connected, accepting connect from any host) id=21 (not connected, accepting connect from any host) id=22 (not connected, accepting connect from any host) id=23 (not connected, accepting connect from any host) id=24 (not connected, accepting connect from any host) id=25 (not connected, accepting connect from any host) id=26 (not connected, accepting connect from any host) Management Node (id=1), Data Node (id=27), and SQL Node (id=3) are on the NDB Node (169.254.100.1); Management Node (id=2), Data Node (id=28), and SQL Node (id=4) are on the NDB Node (169.254.100.2). The two Management Nodes are in Active-Active redundancy mode, and both can manage any Data Node and SQL Node. The two Data Nodes are in Active-Active redundancy mode, any of them can provide service. |
Reference List
| Ericsson Documents |
|---|
| [1] Trademark Information. |
| [2] Typographic Conventions. |
| [3] Glossary of Terms and Acronyms. |
| [4] IPWorks Initial Configuration, 5/1553-AVA 901 33/3 Uen |
| [5] IPWorks Configuration Management. |
| Online References |
|---|
| [6] MySQL Documentation. |

Contents