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?