MySQL Cluster 7.0: careful with ndb_mgmd and --configdir

Using MySQL Cluster 7.0, if you start the management node it will write a binary, cached version of the configuration. The default location is (currently) a bit tricky, if you compile yourself, you’ll find it in: <BASEDIR>/mysql-cluster.

Make sure to specify everytime the --configdir option when starting the ndb_mgmd.

$ ndb_mgmd -f config.ini --configdir=/path/to/cachedir

I’m using the same value as Datadir for the --configdir option.

An elegant solution it is not, IMHO. Maybe it’s good to make your own ndb_mgmd_safe?

Comments

Matthew Montgomery
Geert,

ndb_mgmd will read the defaults file /etc/my.cnf or ~/.my.cnf for a [ndb_mgmd] block. Simply add a block like this:

[ndb_mgmd]
configdir=/path/to/cachedir
config-file=/path/to/config.ini
nbd-connectstring=host1:port,host2:port

Then you can just call ndb_mgmd from the command line without passing any options.
Geert JM Vanderkelen
Matthew,

True, but you still got to set the option, whether it is in the option file or on the command line.
And I can't, since I'm juggling to much between versions :)