MySQL Cluster ndb_mgmd error

MySQLmysql-cluster

I set up MySQL Cluster on Ubuntu. My ndb_mgmd.cnf file looked:

[NDBD DEFAULT]
NoOfReplicas=2
DataDir= /var/lib/mysql-cluster

# Management Node
[NDB_MGMD]
NodeId=1
HostName=192.168.204.20
DataDir=/var/lib/mysql-cluster

# Storage Nodes (one for each node)
[NDBD]
NodeId=2
HostName=192.168.204.25
DataDir=/var/lib/mysql-cluster
[NDBD]
NodeId=3
HostName=192.168.204.26
DataDir=/var/lib/mysql-cluster

# SQL Nodes (one for each node)
[MYSQLD]
NodeId=4
HostName=192.168.204.30

Now I want to edit this configuration, so I changed this file:

[NDBD DEFAULT]
NoOfReplicas=2
DataDir= /var/lib/mysql-cluster

# Management Node
[NDB_MGMD]
NodeId=1
HostName=192.168.204.20
DataDir=/var/lib/mysql-cluster

# Storage Nodes (one for each node)
[NDBD]
NodeId=2
HostName=192.168.204.25
DataDir=/var/lib/mysql-cluster
[NDBD]
NodeId=3
HostName=192.168.204.26
DataDir=/var/lib/mysql-cluster

# SQL Nodes (one for each node)
[MYSQLD]
NodeId=4
HostName=192.168.204.25
[MYSQLD]
NodeId=5
HostName=192.168.204.26

But

ndb_mgm > show;

still shows:

Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 (not connected, accepting connect from 192.168.204.25)
id=3 (not connected, accepting connect from 192.168.204.26)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @192.168.204.20  (mysql-5.1.51 ndb-7.1.9)

[mysqld(API)]   1 node(s)
id=4 (not connected, accepting connect from 192.168.204.30)

I tried:

sudo /etc/init.d/mysql-ndb-mgm restart
sudo ndb_mgmd --initial
sudo ndb_mgmd -f /etc/mysql/ndb_mgmd.cnf

And nothing works. Any help?

Best Answer

MySQL Cluster make cache of its own configuration into files normally located in /usr/mysql-cluster (remove it with rm Linux command line and restart ndb_mgmd). Normally, starting ndb_mgmd with --initial get used to solve this kind of problem, but, you can use --skip-config-cache too.

Cheers, Wagner Bianchi

Related Topic