I'm trying to execute
ndb_desc from API client. The config and parameters are as below:
my.cnf in mysqld:
[mysql_cluster] ndb-connectstring=192.168.1.1,192.168.1.2 server-id=5 log-bin=mysql-bin
config.ini in mgmd: (part of it)
-- ... [mysqld] hostname=192.168.1.5 --- ...
Situation: there are 2x mgmd, 2x data-node, and 2x mysqld.
Parameters tried to call ndb_desc:
# ndb_desc -c 192.168.1.1 --ndb-nodeid=7 -d db_name -t tb_name
Above response with error:
ndb_desc: [ERROR] unknown variable 'server-id=5
my.cnf, removing these two lines of
log-bin, then the error response after calling ndb_desc will be as follow:
Unable to connect to management server. NDBT_ProgramExit: 1 - Failed
There is no firewall, ping to the management is running fine.
So the question: how to exec ndb_desc (with correct parameters)? what is the correct my.cnf/config.ini for setting up the node-id?
update1: changed the config.ini on mgmd for emtpy mysqld section,
ndb_mgm -e show output:
[mysqld(API)] 3 node(s) id=5 @192.168.1.5 (mysql-5.7.23 ndb-7.6.7) id=6 @192.168.1.6 (mysql-5.7.23 ndb-7.6.7) id=7 (not connected, accepting connect from any host)
ndb_desc still has the same response:
Unable to connect to management server.
update2: from mgmd node, saw this log:
WARNING -- Failed to allocate nodeid for API at 192.168.1.5. Returned error: 'Id 7 already allocated by another node.
update3: changed config.ini, added
[api] nodeid=7 host=192.168.1.5. log still the same:
WARNING -- Failed to allocate nodeid for API at 192.168.11.51. Returned error: 'No free node id found for mysqld(API).