1 つのノード マネージャー、1 つの SQL ノード、および 2 つのデータ ノードを備えた mysql クラスター (4 台のマシン) を展開しようとしています。私は、公式の mysql Web サイトから無料であるこれらのチュートリアルに従っています (第 1 部、第 2 部、第 3 部、第 4 部)。ただし、ノード マネージャーで次のように、常に接続されていない SQL ノードに問題があります。
$ sudo ndb_mgm -e show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @10.31.35.40 (mysql-5.6.23 ndb-7.4.5, starting, Nodegroup: 0)
id=3 @10.31.35.42 (mysql-5.6.23 ndb-7.4.5, starting, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @10.31.37.108 (mysql-5.6.23 ndb-7.4.5)
[mysqld(API)] 1 node(s)
id=4 (not connected, accepting connect from 10.31.35.41)
SQLノードが管理ノードに接続されていない理由がわかりません!! Google で同様の問題を探しましたが、まだ問題を解決できません。
私は何回か試しました:
/etc/init.d/mysql.server stop
と
/etc/init.d/mysql.server start
しかし無駄に。
これは詳細モードでの mysqld の出力でもあり、原因がわからない問題について言及しています。
ubuntu@10-31-35-41:/usr/local/mysql/bin$ sudo mysqld --verbose --help
150404 5:26:00 [Note] Plugin 'FEDERATED' is disabled.
150404 5:26:00 [ERROR] mysqld: unknown option '--ndbcluster'
......
また、mysqld_safe の場所を確認しようとすると (チュートリアルの最初の部分でわかるように、フォルダーは /usr/local/mysql に配置されているため、これは正常ではないと思います (そして、mysql を使用することになっています)。 .server ですよね ?)), 私は
$ which mysqld_safe
/usr/bin/mysqld_safe
また、以前にインストールした mysql のパッケージとの競合があるかどうかもわかりません。
これは /etc/mysql/my.cnf です (SQL ノードで、これは作業中のデータ ノードと同じです):
[mysqld]
# Options for mysqld process:
ndbcluster # run NDB storage engine
[mysql_cluster]
# Options for MySQL Cluster processes:
ndb-connectstring=10.31.37.108 # location of management server
これは、ndb_mgm の config.ini ファイルです。
[ndbd default]
# Options affecting ndbd processes on all data nodes:
NoOfReplicas=2 # Number of replicas
DataMemory=80M # How much memory to allocate for data storage
IndexMemory=18M # How much memory to allocate for index storage
# For DataMemory and IndexMemory, we have used the
# default values. Since the "world" database takes up
# only about 500KB, this should be more than enough for
# this example Cluster setup.
[tcp default]
# TCP/IP options:
portnumber=2202 # This the default; however, you can use any
# port that is free for all the hosts in the cluster
# Note: It is recommended that you do not specify the port
# number at all and simply allow the default value to be used
# instead
[ndb_mgmd]
# Management process options:
hostname=10.31.37.108 # Hostname or IP address of MGM node
datadir=/var/lib/mysql-cluster # Directory for MGM node log files
[ndbd]
# Options for data node "A":
# (one [ndbd] section per data node)
hostname=10.31.35.40 # Hostname or IP address
datadir=/usr/local/mysql/data # Directory for this data node's data files
[ndbd]
# Options for data node "B":
hostname=10.31.35.42 # Hostname or IP address
datadir=/usr/local/mysql/data # Directory for this data node's data files
[mysqld]
# SQL node options:
hostname=10.31.35.41 # Hostname or IP address
# (additional mysqld connections can be
# specified for this node for various
# purposes such as running ndb_restore)
よろしくお願いいたします。