mysqlndbmngm

Overview

The NDB Cluster is fairly easy to configure and very flexible and useful in many configurations. Management can be done both: Manually or with the Management node, except for the components on the management node, which has to be started manually.

Manually

Starting depends of the component to start:

Management node:

[root@mysqlndbmgm ~]# ndb_mgmd
MySQL Cluster Management Server mysql-5.7.19 ndb-7.5.7
[root@mysqlndbmgm ~]#

SQL Node:

[root@mysqlsqlnodeb ~]# service mysqld start
[root@mysqlsqlnodeb ~]#
[root@mysqlsqlnodeb ~]# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2018-01-29 07:56:13 EST; 4s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 1032 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
  Process: 1015 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 1036 (mysqld)
   CGroup: /system.slice/mysqld.service
           └─1036 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Jan 29 07:56:12 mysqlsqlnodeb mysqld[1032]: 2018-01-29 07:56:12 [NdbApi] INFO     -- Flushing incomplete GCI:s < 39086/13
Jan 29 07:56:12 mysqlsqlnodeb mysqld[1032]: 2018-01-29 07:56:12 [NdbApi] INFO     -- Flushing incomplete GCI:s < 39086/13
Jan 29 07:56:12 mysqlsqlnodeb mysqld[1032]: 2018-01-29T12:56:12.695076Z 1 [Note] NDB Binlog: starting log at epoch 39086/13
Jan 29 07:56:12 mysqlsqlnodeb mysqld[1032]: 2018-01-29T12:56:12.695085Z 1 [Note] NDB Binlog: Got first event
Jan 29 07:56:12 mysqlsqlnodeb mysqld[1032]: 2018-01-29T12:56:12.695090Z 1 [Note] NDB Binlog: ndb tables writable
Jan 29 07:56:12 mysqlsqlnodeb mysqld[1032]: 2018-01-29T12:56:12.695359Z 1 [Note] NDB Binlog: Startup and setup completed
Jan 29 07:56:12 mysqlsqlnodeb mysqld[1032]: 2018-01-29T12:56:12.696770Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engin...ip this check.
Jan 29 07:56:12 mysqlsqlnodeb mysqld[1032]: 2018-01-29T12:56:12.696774Z 0 [Note] Beginning of list of non-natively partitioned tables
Jan 29 07:56:13 mysqlsqlnodeb mysqld[1032]: 2018-01-29T12:56:13.085154Z 0 [Note] End of list of non-natively partitioned tables
Jan 29 07:56:13 mysqlsqlnodeb systemd[1]: Started MySQL Server.
Hint: Some lines were ellipsized, use -l to show in full.
[root@mysqlsqlnodeb ~]#

Management node is able to shutdown and start up any component, therefore the syntax is the same:

ndb_mgm> <id> <command>

Example:

ndb_mgm> 3 start
Database node 3 is being started.
Node 3: Started (version 7.5.7)

ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2    @192.168.0.110  (mysql-5.7.19 ndb-7.5.7, starting, Nodegroup: 0)
id=3    @192.168.0.120  (mysql-5.7.19 ndb-7.5.7, Nodegroup: 0, *)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @192.168.0.100  (mysql-5.7.19 ndb-7.5.7)

[mysqld(API)]   2 node(s)
id=4    @192.168.0.210  (mysql-5.7.19 ndb-7.5.7)
id=5    @192.168.0.220  (mysql-5.7.19 ndb-7.5.7)

ndb_mgm>


A particular node can be stop as long as the ID is known.

ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2    @192.168.0.110  (mysql-5.7.19 ndb-7.5.7, Nodegroup: 0, *)
id=3    @192.168.0.120  (mysql-5.7.19 ndb-7.5.7, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @192.168.0.100  (mysql-5.7.19 ndb-7.5.7)

[mysqld(API)]   2 node(s)
id=4    @192.168.0.210  (mysql-5.7.19 ndb-7.5.7)
id=5    @192.168.0.220  (mysql-5.7.19 ndb-7.5.7)

ndb_mgm> 2 stop     <- Stop of Node with ID 2
Node 2: Node shutdown initiated
Node 2: Node shutdown completed.
Node 2 has shutdown.

Status

Display Status

[root@mysqlsqlnodea ~]# ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: 192.168.0.100:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2    @192.168.0.110  (mysql-5.7.19 ndb-7.5.7, Nodegroup: 0, *)
id=3    @192.168.0.120  (mysql-5.7.19 ndb-7.5.7, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @192.168.0.100  (mysql-5.7.19 ndb-7.5.7)

[mysqld(API)]   2 node(s)
id=4    @192.168.0.210  (mysql-5.7.19 ndb-7.5.7)
id=5    @192.168.0.220  (mysql-5.7.19 ndb-7.5.7)

  • mysqlndbmngm.txt
  • Last modified: 2019/10/18 20:04
  • by 127.0.0.1