Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Jun 14 '11 at 20:34

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

up vote 0 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.