I am attempting to setup a MySQL Cluster.
I have the folllowing setup
- one management node
- two data nodes
- another machine on which two more nodes reside
Below is the config.ini file:
[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.
DataDir=/var/lib/mysql-cluster
[MYSQLD DEFAULT]
[NDB_MGMD DEFAULT]
LogDestination=FILE:filename=my-cluster.log
[tcp default]
[ndb_mgmd]
# Management process options:
hostname=X.X.X.26 # Hostname or IP address of MGM node
datadir=/var/lib/mysql-cluster # Directory for MGM node log files
# Storage Nodes
[NDBD]
hostname=X.X.X.26 # IP address of storage-node-1
DataDir= /var/lib/mysql-cluster
[NDBD]
HostName=X.X.X.73 # IP address of storage-node-2
DataDir= /var/lib/mysql-cluster
[NDBD]
hostname=X.X.X.26 # IP address of storage-node-3
DataDir= /var/lib/mysql-cluster
[NDBD]
HostName=X.X.X.73 # IP address of storage-node-4
DataDir= /var/lib/mysql-cluster
# Setup node IDs for mySQL API-servers (clients of the cluster)
[mysqld]
# SQL node options:
hostname=X.X.X.73 # Hostname or IP address
# (additional mysqld connections can be
# specified for this node for various
# purposes such as running ndb_restore)
Below is the my.cnf file for both systems:
[mysqld] ndbcluster # run NDB storage engine ndb-connectstring=X.X.X.26 # location of management server [mysql_cluster] ndb-connectstring=X.X.X.26 # location of management server
When I try to start the cluster, it gives me following error:
Could not determine which NodeID to use for this node. Specify it with --ndb-nodeid=<nodeid> on command line
If clustering setup is done, there is no replication of data as it give me again another error: ERROR 1296 (HY000): Got error 4009 'Cluster Failure' from NDBCLUSTER
Can anyone help me determine the problem?