MySQL Clusterの良いところの一つに、Rolling Upgradeが可能なので、
サービスを停止せずに、MySQL Clusterのアップグレードが可能な部分があると思います。
やはり、アップグレードにサービス停止を伴うと、インフラ管理者もサービス担当者と
メンテナンス時間の調整をしなければならず、なかなか対応がが難しいと思います。

アップグレードには、MCM(MySQL Cluster Manager)というCommercial版のツールを使えば、
コマンド一つでアップグレード可能ですが、今回はマニュアルで一つ一つアップグレードしています。

MySQL Cluster Managerは、基本的な管理ダスクを自動化することによって、
MySQL データベースの作成と管理を簡易化します。
MCM参照:
https://www-jp.mysql.com/products/cluster/mcm/
その他:
How MySQL is able to scale to 200 Million QPS – MySQL Cluster
http://highscalability.com/blog/2015/5/18/how-mysql-is-able-to-scale-to-200-million-qps-mysql-cluster.html

■ 現状の構成確認
本番環境ではお勧めしませんが、デモ環境なので2台のサーバー上に共存して構成しています。

SQL Node x 2
Data Node x 2
Management Node x 1

+------+   +------+
| SQL1 |   | SQL2 |
+------+   +------+
+------+   +------+
| NDB1 |   | NDB2 |
+------+   +------+

※この検証環境では、管理ノードはSQL1, NDB1と同居してます。

before_one_node

1) アップグレード前の事前動作確認

mysql> select @@hostname;
+--------------+
| @@hostname   |
+--------------+
| cluster74_01 |
+--------------+
1 row in set (0.00 sec)

mysql> select * from T20150319;
+----+---------------------------------------------+
| id | memo                                        |
+----+---------------------------------------------+
|  3 | This is MySQL Cluster 7.4.4 検証 Restored   |
|  6 | SQL Connection 2015-03-24                   |
|  5 | This is MySQL Cluster 7.4.4 検証 Restored   |
|  1 | This is MySQL Cluster 7.4.4 検証            |
|  2 | This is MySQL Cluster 7.4.4 検証 Restored   |
|  4 | This is MySQL Cluster 7.4.4 検証 Restored   |
+----+---------------------------------------------+
6 rows in set (0.01 sec)

mysql> insert into T20150319(memo) values('rolling upgrade cluster step by step');
Query OK, 1 row affected (0.01 sec)

mysql> select * from T20150319 order by id;
+----+---------------------------------------------+
| id | memo                                        |
+----+---------------------------------------------+
|  1 | This is MySQL Cluster 7.4.4 検証            |
|  2 | This is MySQL Cluster 7.4.4 検証 Restored   |
|  3 | This is MySQL Cluster 7.4.4 検証 Restored   |
|  4 | This is MySQL Cluster 7.4.4 検証 Restored   |
|  5 | This is MySQL Cluster 7.4.4 検証 Restored   |
|  6 | SQL Connection 2015-03-24                   |
|  7 | rolling upgrade cluster step by step        |
+----+---------------------------------------------+
7 rows in set (0.00 sec)

mysql> explain select * from T20150319 where id = 1;
+----+-------------+-----------+--------+---------------+---------+---------+-------+------+-------+
| id | select_type | table     | type   | possible_keys | key     | key_len | ref   | rows | Extra |
+----+-------------+-----------+--------+---------------+---------+---------+-------+------+-------+
|  1 | SIMPLE      | T20150319 | eq_ref | PRIMARY       | PRIMARY | 4       | const |    1 | NULL  |
+----+-------------+-----------+--------+---------------+---------+---------+-------+------+-------+
1 row in set (0.01 sec)

mysql> explain select * from T20150319 where memo like 'This is MySQL%';
+----+-------------+-----------+------+---------------+------+---------+------+------+-----------------------------------+
| id | select_type | table     | type | possible_keys | key  | key_len | ref  | rows | Extra                             |
+----+-------------+-----------+------+---------------+------+---------+------+------+-----------------------------------+
|  1 | SIMPLE      | T20150319 | ALL  | NULL          | NULL | NULL    | NULL |    7 | Using where with pushed condition |
+----+-------------+-----------+------+---------------+------+---------+------+------+-----------------------------------+
1 row in set (0.00 sec)

mysql> 

2) Active/Active型のClusterなので、当然データは他のノードからも参照出来ます。

mysql> select @@hostname;
+--------------+
| @@hostname   |
+--------------+
| cluster74_02 |
+--------------+
1 row in set (0.00 sec)

mysql> select * from T20150319 order by id;
+----+---------------------------------------------+
| id | memo                                        |
+----+---------------------------------------------+
|  1 | This is MySQL Cluster 7.4.4 検証            |
|  2 | This is MySQL Cluster 7.4.4 検証 Restored   |
|  3 | This is MySQL Cluster 7.4.4 検証 Restored   |
|  4 | This is MySQL Cluster 7.4.4 検証 Restored   |
|  5 | This is MySQL Cluster 7.4.4 検証 Restored   |
|  6 | SQL Connection 2015-03-24                   |
|  7 | rolling upgrade cluster step by step        |
+----+---------------------------------------------+
7 rows in set (0.00 sec)

mysql>

■ Rolling Upgradeの為、1/2のデータノードを停止しました。

[root@cluster74_01 cluster]# /usr/local/mysql/bin/ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: 192.168.56.114:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1    @192.168.56.114  (mysql-5.6.23 ndb-7.4.4, Nodegroup: 0, *)
id=2    @192.168.56.115  (mysql-5.6.23 ndb-7.4.4, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=100  @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)

[mysqld(API)]   2 node(s)
id=50   @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)
id=51   @192.168.56.115  (mysql-5.6.23 ndb-7.4.4)

ndb_mgm> 2 stop
Node 2: Node shutdown initiated
Node 2: Node shutdown completed.
Node 2 has shutdown.

ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1    @192.168.56.114  (mysql-5.6.23 ndb-7.4.4, Nodegroup: 0, *)
id=2 (not connected, accepting connect from 192.168.56.115)

[ndb_mgmd(MGM)] 1 node(s)
id=100  @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)

[mysqld(API)]   2 node(s)
id=50   @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)
id=51   @192.168.56.115  (mysql-5.6.23 ndb-7.4.4)

—- Node 2で、SQLインスタンスも停止しました。

問題無く、アップグレード対象ノードが停止している事を確認。

ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1    @192.168.56.114  (mysql-5.6.23 ndb-7.4.4, Nodegroup: 0, *)
id=2 (not connected, accepting connect from 192.168.56.115)

[ndb_mgmd(MGM)] 1 node(s)
id=100  @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)

[mysqld(API)]   2 node(s)
id=50   @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)
id=51 (not connected, accepting connect from 192.168.56.115)

ndb_mgm> 

■1/2ノードにてバイナリーダウンロードと入れ替え

[root@cluster74_02 local]# tar zxvf /home/admin/mysql-cluster-advanced-7.4.6-linux-glibc2.5-x86_64.tar.gz 

Snip

mysql-cluster-advanced-7.4.6-linux-glibc2.5-x86_64/include/plugin_audit.h
mysql-cluster-advanced-7.4.6-linux-glibc2.5-x86_64/include/mysql_com.h
mysql-cluster-advanced-7.4.6-linux-glibc2.5-x86_64/include/my_dir.h
[root@cluster74_02 local]# ls -l
合計 8
drwxr-xr-x.  2 root root     6  6月 10  2014 bin
drwxr-xr-x.  2 root root     6  6月 10  2014 etc
drwxr-xr-x.  2 root root     6  6月 10  2014 games
drwxr-xr-x.  2 root root     6  6月 10  2014 include
drwxr-xr-x.  2 root root     6  6月 10  2014 lib
drwxr-xr-x.  2 root root     6  6月 10  2014 lib64
drwxr-xr-x.  2 root root     6  6月 10  2014 libexec
lrwxrwxrwx.  1 root root    51  3月 17 12:28 mysql -> mysql-cluster-advanced-7.4.4-linux-glibc2.5-x86_64/
drwxr-xr-x. 15 root mysql 4096  3月 20 18:13 mysql-cluster-advanced-7.4.4-linux-glibc2.5-x86_64
drwxr-xr-x. 13 root root  4096  5月 14 00:21 mysql-cluster-advanced-7.4.6-linux-glibc2.5-x86_64
drwxr-xr-x.  2 root root     6  6月 10  2014 sbin
drwxr-xr-x.  5 root root    46  3月 17 11:29 share
drwxr-xr-x.  2 root root    70  3月 17 12:28 src
[root@cluster74_02 local]# 

[root@cluster74_02 local]# rm mysql
rm: シンボリックリンク `mysql' を削除しますか? y
[root@cluster74_02 local]# ln -s mysql-cluster-advanced-7.4.6-linux-glibc2.5-x86_64/ mysql
[root@cluster74_02 local]# ls -l
合計 8
drwxr-xr-x.  2 root root     6  6月 10  2014 bin
drwxr-xr-x.  2 root root     6  6月 10  2014 etc
drwxr-xr-x.  2 root root     6  6月 10  2014 games
drwxr-xr-x.  2 root root     6  6月 10  2014 include
drwxr-xr-x.  2 root root     6  6月 10  2014 lib
drwxr-xr-x.  2 root root     6  6月 10  2014 lib64
drwxr-xr-x.  2 root root     6  6月 10  2014 libexec
lrwxrwxrwx.  1 root root    51  5月 14 00:23 mysql -> mysql-cluster-advanced-7.4.6-linux-glibc2.5-x86_64/
drwxr-xr-x. 15 root mysql 4096  3月 20 18:13 mysql-cluster-advanced-7.4.4-linux-glibc2.5-x86_64
drwxr-xr-x. 13 root root  4096  5月 14 00:21 mysql-cluster-advanced-7.4.6-linux-glibc2.5-x86_64
drwxr-xr-x.  2 root root     6  6月 10  2014 sbin
drwxr-xr-x.  5 root root    46  3月 17 11:29 share
drwxr-xr-x.  2 root root    70  3月 17 12:28 src
[root@cluster74_02 local]# chown -R mysql:mysql mysql/
[root@cluster74_02 local]# chmod -R 755 mysql/
[root@cluster74_02 local]# ls -l
合計 8
drwxr-xr-x.  2 root  root     6  6月 10  2014 bin
drwxr-xr-x.  2 root  root     6  6月 10  2014 etc
drwxr-xr-x.  2 root  root     6  6月 10  2014 games
drwxr-xr-x.  2 root  root     6  6月 10  2014 include
drwxr-xr-x.  2 root  root     6  6月 10  2014 lib
drwxr-xr-x.  2 root  root     6  6月 10  2014 lib64
drwxr-xr-x.  2 root  root     6  6月 10  2014 libexec
lrwxrwxrwx.  1 root  root    51  5月 14 00:23 mysql -> mysql-cluster-advanced-7.4.6-linux-glibc2.5-x86_64/
drwxr-xr-x. 15 root  mysql 4096  3月 20 18:13 mysql-cluster-advanced-7.4.4-linux-glibc2.5-x86_64
drwxr-xr-x. 13 mysql mysql 4096  5月 14 00:21 mysql-cluster-advanced-7.4.6-linux-glibc2.5-x86_64
drwxr-xr-x.  2 root  root     6  6月 10  2014 sbin
drwxr-xr-x.  5 root  root    46  3月 17 11:29 share
drwxr-xr-x.  2 root  root    70  3月 17 12:28 src
[root@cluster74_02 local]# 

■旧バージョンからファイルのコピー
– DATAフォルダー
– MYSQL Cluster用フォルダー
– BACKUPフォルダー


[root@cluster74_02 mysql-cluster-advanced-7.4.4-linux-glibc2.5-x86_64]# cp -rp mysql-cluster/ /usr/local/mysql/
[root@cluster74_02 mysql-cluster-advanced-7.4.4-linux-glibc2.5-x86_64]# ls -l /usr/local/mysql/
合計 140
-rwxr-xr-x.  1 mysql mysql 102986  4月  2 02:09 INSTALL-BINARY
-rwxr-xr-x.  1 mysql mysql   2730  4月  2 02:09 LICENSE.mysql
-rwxr-xr-x.  1 mysql mysql   1446  4月  2 02:09 README
drwxr-xr-x.  2 mysql mysql   4096  5月 14 00:21 bin
drwxr-xr-x.  3 mysql mysql     17  5月 14 00:21 data
drwxr-xr-x.  2 mysql mysql     69  5月 14 00:21 docs
drwxr-xr-x.  4 mysql mysql   4096  5月 14 00:21 include
drwxr-xr-x.  3 mysql mysql   4096  5月 14 00:21 lib
drwxr-xr-x.  4 mysql mysql     28  5月 14 00:21 man
drwxr-xr-x.  2 root  root      27  3月 18 10:31 mysql-cluster
drwxr-xr-x. 10 mysql mysql   4096  5月 14 00:21 mysql-test
drwxr-xr-x.  2 mysql mysql     29  5月 14 00:21 scripts
drwxr-xr-x. 32 mysql mysql   4096  5月 14 00:21 share
drwxr-xr-x.  4 mysql mysql   4096  5月 14 00:21 sql-bench
drwxr-xr-x.  2 mysql mysql   4096  5月 14 00:21 support-files
[root@cluster74_02 mysql-cluster-advanced-7.4.4-linux-glibc2.5-x86_64]# 


[root@cluster74_02 mysql-cluster-advanced-7.4.4-linux-glibc2.5-x86_64]# cp -rp data/ /usr/local/mysql/
cp: `/usr/local/mysql/data/test/db.opt' を上書きしますか? y
[root@cluster74_02 mysql-cluster-advanced-7.4.4-linux-glibc2.5-x86_64]# ls -l /usr/local/mysql/data/
合計 111192
drwx------. 2 mysql mysql       59  3月 24 16:53 NDB01
-rw-rw----. 1 mysql mysql       56  3月 18 09:46 auto.cnf
-rw-r-----. 1 mysql root    156430  5月 13 22:23 cluster74_02.err
-rw-rw----. 1 mysql mysql 50331648  5月 13 22:23 ib_logfile0
-rw-rw----. 1 mysql mysql 50331648  3月 18 09:45 ib_logfile1
-rw-rw----. 1 mysql mysql 12582912  5月 13 22:23 ibdata1
drwx------. 2 mysql mysql     4096  3月 20 22:13 mysql
-rw-r--r--. 1 root  root         4  5月 13 21:55 ndb_2.pid
drwxr-x---. 9 root  root        72  3月 19 23:26 ndb_2_fs
-rw-r--r--. 1 root  root    426545  5月 13 22:14 ndb_2_out.log
drwx------. 2 mysql mysql     4096  3月 20 22:13 ndbinfo
drwx------. 2 mysql mysql     4096  3月 19 23:45 ndbmemcache
drwx------. 2 mysql mysql     4096  3月 18 09:45 performance_schema
drwxr-xr-x. 2 mysql mysql       19  3月 17 12:26 test
[root@cluster74_02 mysql-cluster-advanced-7.4.4-linux-glibc2.5-x86_64]# 


[root@cluster74_02 mysql-cluster-advanced-7.4.4-linux-glibc2.5-x86_64]# cp -rp BACKUP/ /usr/local/mysql/
[root@cluster74_02 mysql-cluster-advanced-7.4.4-linux-glibc2.5-x86_64]# ls -l /usr/local/mysql/
合計 144
drwxr-x---.  3 root  root      19  3月 20 18:21 BACKUP
-rwxr-xr-x.  1 mysql mysql 102986  4月  2 02:09 INSTALL-BINARY
-rwxr-xr-x.  1 mysql mysql   2730  4月  2 02:09 LICENSE.mysql
-rwxr-xr-x.  1 mysql mysql   1446  4月  2 02:09 README
drwxr-xr-x.  2 mysql mysql   4096  5月 14 00:21 bin
drwxr-xr-x.  9 mysql mysql   4096  5月 13 22:23 data
drwxr-xr-x.  2 mysql mysql     69  5月 14 00:21 docs
drwxr-xr-x.  4 mysql mysql   4096  5月 14 00:21 include
drwxr-xr-x.  3 mysql mysql   4096  5月 14 00:21 lib
drwxr-xr-x.  4 mysql mysql     28  5月 14 00:21 man
drwxr-xr-x.  2 root  root      27  3月 18 10:31 mysql-cluster
drwxr-xr-x. 10 mysql mysql   4096  5月 14 00:21 mysql-test
drwxr-xr-x.  2 mysql mysql     29  5月 14 00:21 scripts
drwxr-xr-x. 32 mysql mysql   4096  5月 14 00:21 share
drwxr-xr-x.  4 mysql mysql   4096  5月 14 00:21 sql-bench
drwxr-xr-x.  2 mysql mysql   4096  5月 14 00:21 support-files
[root@cluster74_02 mysql-cluster-advanced-7.4.4-linux-glibc2.5-x86_64]#

■データノードとSQLノードを起動


[root@cluster74_02 mysql]# chown -R root .
[root@cluster74_02 mysql]# chown -R mysql data
[root@cluster74_02 mysql]# /usr/local/mysql/bin/ndbd --connect-string=192.168.56.114 --nostart
2015-05-14 00:34:31 [ndbd] INFO     -- Angel connected to '192.168.56.114:1186'
2015-05-14 00:34:32 [ndbd] INFO     -- Angel allocated nodeid: 2
[root@cluster74_02 mysql]# /usr/local/mysql/bin/mysqld_safe &
[1] 3801
[root@cluster74_02 mysql]# 150514 00:34:50 mysqld_safe Logging to '/usr/local/mysql/data/cluster74_02.err'.
150514 00:34:50 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

[root@cluster74_02 mysql]# 



[root@cluster74_02 mysql]# ./bin/mysql_upgrade -u root -p
Enter password: 
Looking for 'mysql' as: ./bin/mysql
Looking for 'mysqlcheck' as: ./bin/mysqlcheck
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.general_log                                  OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.innodb_index_stats                           OK
mysql.innodb_table_stats                           OK
mysql.ndb_apply_status                             OK
mysql.ndb_binlog_index                             OK
mysql.ndb_index_stat_head                          OK
mysql.ndb_index_stat_sample                        OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.servers                                      OK
mysql.slave_master_info                            OK
mysql.slave_relay_log_info                         OK
mysql.slave_worker_info                            OK
mysql.slow_log                                     OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
Running 'mysql_fix_privilege_tables'...
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
NDB01.T20150319                                    OK
ndbinfo.blocks                                     OK
ndbinfo.config_params                              OK
ndbinfo.dict_obj_types                             OK
ndbmemcache.cache_policies                         OK
ndbmemcache.containers                             OK
ndbmemcache.demo_table                             OK
ndbmemcache.demo_table_large                       OK
ndbmemcache.demo_table_tabs                        OK
ndbmemcache.external_values                        OK
ndbmemcache.key_prefixes                           OK
ndbmemcache.last_memcached_signon                  OK
ndbmemcache.memcache_server_roles                  OK
ndbmemcache.meta                                   OK
ndbmemcache.ndb_clusters                           OK
OK
[root@cluster74_02 mysql]# 

After_one_node

■MySQL Cluster管理ノードにて確認してみる
– バージョンが混在している状態


ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1    @192.168.56.114  (mysql-5.6.23 ndb-7.4.4, Nodegroup: 0, *)
id=2    @192.168.56.115  (mysql-5.6.24 ndb-7.4.6, not started)

[ndb_mgmd(MGM)] 1 node(s)
id=100  @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)

[mysqld(API)]   2 node(s)
id=50   @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)
id=51   @192.168.56.115  (mysql-5.6.24 ndb-7.4.6)

ndb_mgm> ndb_mgm> 2 start 
Node 2: Start initiated (version 7.4.6)
Database node 2 is being started.

ndb_mgm> Node 2: Started (version 7.4.6)

ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1    @192.168.56.114  (mysql-5.6.23 ndb-7.4.4, Nodegroup: 0, *)
id=2    @192.168.56.115  (mysql-5.6.24 ndb-7.4.6, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=100  @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)

[mysqld(API)]   2 node(s)
id=50   @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)
id=51   @192.168.56.115  (mysql-5.6.24 ndb-7.4.6)

ndb_mgm> 

Version
mysql

Data操作
insert_diff_version

■ アップグレード中
管理ノードをarbitratorに設定しているので、こちらは特に変更が無い事を確認。


mysql> select * from arbitrator_validity_detail;
+---------+------------+------------------+---------------+-----------+
| node_id | arbitrator | arb_ticket       | arb_connected | arb_state |
+---------+------------+------------------+---------------+-----------+
|       1 |        100 | 08320002001a414c | Yes           | ARBIT_RUN |
|       2 |        100 | 08320002001a414c | Yes           | ARBIT_RUN |
+---------+------------+------------------+---------------+-----------+
2 rows in set (0.01 sec)

mysql> select * from  arbitrator_validity_summary ;
+------------+------------------+---------------+-----------------+
| arbitrator | arb_ticket       | arb_connected | consensus_count |
+------------+------------------+---------------+-----------------+
|        100 | 08320002001a414c | Yes           |               2 |
+------------+------------------+---------------+-----------------+
1 row in set (0.01 sec)

mysql> 

■ 2/2のノードをアップグレード開始
– 対象ノードをSTOPコマンドで停止


ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1    @192.168.56.114  (mysql-5.6.23 ndb-7.4.4, Nodegroup: 0, *)
id=2    @192.168.56.115  (mysql-5.6.24 ndb-7.4.6, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=100  @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)

[mysqld(API)]   2 node(s)
id=50   @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)
id=51   @192.168.56.115  (mysql-5.6.24 ndb-7.4.6)

ndb_mgm> 1 stop
Node 1: Node shutdown initiated
Node 1 has shutdown.

ndb_mgm> Node 1: Node shutdown completed.

ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1 (not connected, accepting connect from 192.168.56.114)
id=2    @192.168.56.115  (mysql-5.6.24 ndb-7.4.6, Nodegroup: 0, *)

[ndb_mgmd(MGM)] 1 node(s)
id=100  @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)

[mysqld(API)]   2 node(s)
id=50   @192.168.56.114  (mysql-5.6.23 ndb-7.4.4)
id=51   @192.168.56.115  (mysql-5.6.24 ndb-7.4.6)

ndb_mgm> 100 stop
Node 100 has shutdown.
Disconnecting to allow Management Server to shutdown

ndb_mgm> 

arbitorator_shutdown1

その他の作業は、最初のノードと同様の手順でバイナリーの入れ替え
コマンドで管理ノード、データノード、SQLノードを起動します。


[root@cluster74_01 mysql]# /usr/local/mysql/bin/ndb_mgmd -f /usr/local/mysql/mysql-cluster/ndb-config.ini
MySQL Cluster Management Server mysql-5.6.24 ndb-7.4.6
[root@cluster74_01 mysql]# /usr/local/mysql/bin/ndbd --connect-string=192.168.56.114 --nostart
2015-05-14 02:19:06 [ndbd] INFO     -- Angel connected to '192.168.56.114:1186'
2015-05-14 02:19:06 [ndbd] INFO     -- Angel allocated nodeid: 1
[root@cluster74_01 mysql]# /usr/local/mysql/bin/mysqld_safe &
[1] 5066
[root@cluster74_01 mysql]# 150514 02:19:17 mysqld_safe Logging to '/usr/local/mysql/data/cluster74_01.err'.
150514 02:19:17 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

[root@cluster74_01 mysql]# 

全ノードのMySQLのバイナリーが同じバージョンになっている事を確認
– STOPしているノードをSTARTコマンドで開始


[root@cluster74_01 mysql]# /usr/local/mysql/bin/ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: 192.168.56.114:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1    @192.168.56.114  (mysql-5.6.24 ndb-7.4.6, not started)
id=2    @192.168.56.115  (mysql-5.6.24 ndb-7.4.6, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=100  @192.168.56.114  (mysql-5.6.24 ndb-7.4.6)

[mysqld(API)]   2 node(s)
id=50 (not connected, accepting connect from 192.168.56.114)
id=51   @192.168.56.115  (mysql-5.6.24 ndb-7.4.6)

ndb_mgm> 1 start
Node 1: Start initiated (version 7.4.6)
Database node 1 is being started.

ndb_mgm> Node 1: Started (version 7.4.6)

ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1    @192.168.56.114  (mysql-5.6.24 ndb-7.4.6, Nodegroup: 0)
id=2    @192.168.56.115  (mysql-5.6.24 ndb-7.4.6, Nodegroup: 0, *)

[ndb_mgmd(MGM)] 1 node(s)
id=100  @192.168.56.114  (mysql-5.6.24 ndb-7.4.6)

[mysqld(API)]   2 node(s)
id=50   @192.168.56.114  (mysql-5.6.24 ndb-7.4.6)
id=51   @192.168.56.115  (mysql-5.6.24 ndb-7.4.6)

ndb_mgm> 

after_upgrade_fin


[root@cluster74_01 mysql]# ./bin/mysql_upgrade -u root -p
Enter password: 
Looking for 'mysql' as: ./bin/mysql
Looking for 'mysqlcheck' as: ./bin/mysqlcheck
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.general_log                                  OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.innodb_index_stats                           OK
mysql.innodb_table_stats                           OK
mysql.ndb_apply_status                             OK
mysql.ndb_binlog_index                             OK
mysql.ndb_index_stat_head                          OK
mysql.ndb_index_stat_sample                        OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.servers                                      OK
mysql.slave_master_info                            OK
mysql.slave_relay_log_info                         OK
mysql.slave_worker_info                            OK
mysql.slow_log                                     OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
Running 'mysql_fix_privilege_tables'...
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
NDB01.T20150319                                    OK
ndbinfo.blocks                                     OK
ndbinfo.config_params                              OK
ndbinfo.dict_obj_types                             OK
ndbmemcache.cache_policies                         OK
ndbmemcache.containers                             OK
ndbmemcache.demo_table                             OK
ndbmemcache.demo_table_large                       OK
ndbmemcache.demo_table_tabs                        OK
ndbmemcache.external_values                        OK
ndbmemcache.key_prefixes                           OK
ndbmemcache.last_memcached_signon                  OK
ndbmemcache.memcache_server_roles                  OK
ndbmemcache.meta                                   OK
ndbmemcache.ndb_clusters                           OK
OK
[root@cluster74_01 mysql]# 

アップグレード最終確認


ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1    @192.168.56.114  (mysql-5.6.24 ndb-7.4.6, Nodegroup: 0)
id=2    @192.168.56.115  (mysql-5.6.24 ndb-7.4.6, Nodegroup: 0, *)

[ndb_mgmd(MGM)] 1 node(s)
id=100  @192.168.56.114  (mysql-5.6.24 ndb-7.4.6)

[mysqld(API)]   2 node(s)
id=50   @192.168.56.114  (mysql-5.6.24 ndb-7.4.6)
id=51   @192.168.56.115  (mysql-5.6.24 ndb-7.4.6)

ndb_mgm> 

基本動作確認し、ログを見てエラーが無い事を確認して終了
confirmSQLfinal

メモ: 本番では、arbitratorの設定をもう少し明確に設定しておく。

参照: 18.5.5 Performing a Rolling Restart of a MySQL Cluster

Comments are closed.

Post Navigation