0

I am attempting to set up a MySQL Cluster.

I have the following setup:

  • One management node
  • Two data nodes
  • One SQL node

Below is the config.ini file:

[ndbd default]
# Options affecting ndbd processes on all data nodes:
NoOfReplicas=1 # Number of replicas
DataMemory=256M # How much memory to allocate for data storage
IndexMemory=128M # How much memory to allocate for index storage
#Directory for Data Node
DataDir=/var/lib/mysql-cluster
[ndb_mgmd]
# Management process options:
HostName=x.x.x.21
datadir=/var/lib/mysql-cluster
# Storage Nodes
[NDBD]
HostName=x.x.x.188
DataDir= /var/lib/mysql-cluster
[NDBD]
HostName=x.x.x.189
DataDir= /var/lib/mysql-cluster
# Setup node IDs for MySQL API-servers (clients of the cluster)
[mysqld]
# SQL node options:
hostname=x.x.x.22

Below is my.cnf file

[mysqld]
ndbcluster # run NDB storage engine
ndb-connectstring=X.X.X.21 # location of management server
[mysql_cluster]
ndb-connectstring=X.X.X.21 # location of management server

But when I start command ndb_mgmd -f /etc/config.ini --initial I am getting the following error:

MySQL Cluster Management Server mysql-5.6.28 ndb-7.4.10

2018年05月09日 14:29:08 [MgmtSrvr] ERROR -- Could not determine which nodeid to use for this node. Specify it with --ndb-nodeid= on command line

Can anyone please help?

asked May 9, 2018 at 14:47

2 Answers 2

1

To keep things simple I am always specifying node ids in config.ini:

[NDB_MGMD]
NodeId=1
hostname=10.xxx.xxx.xxx
[NDBD]
NodeId=10
hostname=10.xxx.xxx.xxx
datadir=/mysql/cluster
[NDBD]
NodeId=11
hostname=10.xxx.xxx.xxx
datadir=/mysql/cluster
[MYSQLD]
NodeId=20
[MYSQLD]
NodeId=21
[MYSQLD]
NodeId=22
...
answered May 10, 2018 at 12:49
0

(Disclaimer: I'm no expert on NDB Cluster)

A few options to try:

Have you tried ndb_mgmd with the --no-nodeid-checks option?

Description on the ndb_mgmd documentation page

As the error message suggests, maybe try ndb_mgmd with the --ndb-nodeid= option? I'm guessing any small number might be valid. (Note: guessing!)

Description on the Common NDB Options documentation page

answered May 10, 2018 at 7:29

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.