Examples
1. To obtain the node ID and type of each node in the cluster:
shell>
./ndb_config --query=id,type --fields=':' --rows='\n'
1:ndbd
2:ndbd
3:ndbd
4:ndbd
5:ndb_mgmd
6:mysqld
7:mysqld
8:mysqld
9:mysqld
In this example, we used the
colon character (:), and the
output.
2. To produce a connectstring that can be used by data, SQL, and API nodes to connect to the
management server:
shell>
./ndb_config --config-file=usr/local/mysql/cluster-data/config.ini \
--query=hostname,portnumber --fields=: --rows=, --type=ndb_mgmd
192.168.0.179:1186
3. This invocation of
the values for each node's ID and host name, and its DataMemory, IndexMemory, and
parameters:
shell>
./ndb_config --type=ndbd --query=id,host,datamemory,indexmemory,datadir -f ' : ' -r '\n'
1 : 192.168.0.193 : 83886080 : 18874368 : /usr/local/mysql/cluster-data
2 : 192.168.0.112 : 83886080 : 18874368 : /usr/local/mysql/cluster-data
3 : 192.168.0.176 : 83886080 : 18874368 : /usr/local/mysql/cluster-data
4 : 192.168.0.119 : 83886080 : 18874368 : /usr/local/mysql/cluster-data
In this example, we used the short options
separator, respectively.
4. To exclude results from any host except one in particular, use the
shell>
./ndb_config --host=192.168.0.176 -f : -r '\n' -q id,type
3:ndbd
5:ndb_mgmd
In this example, we also used the short form
Similarly, you can limit results to a node with a specific ID using the
17.4.5.
ndb_cpcd
This utility is found in the
testing and debugging MySQL Cluster. Because it can control processes on remote systems, it is not
advisable to use
The source files for
MySQL source tree.
17.4.6.
ndb_delete_all
ndb_delete_all
than
DELETE
Usage
ndb_delete_all -c
— Automate Testing for NDB Development
ndb_cpcd
--fields
--rows
checks only data nodes (using the
ndb_config
— Automate Testing for NDB Development
directory. It is part of an internal automated test framework used in
libexec
in a production cluster.
ndb_cpcd
may be found in the directory storage/ndb/src/cw/cpcd, in the
ndb_cpcd
— Delete All Rows from an NDB Table
deletes all rows from the given
or even
TRUNCATE
TABLE.
connect_string tbl_name
options to separate the ID and type of each node with a
options to place the values for each node on a new line in the
and
for setting the field delimiter and row
-f
-r
to determine the attributes to be queried.
-q
table. In some cases, this can be much faster
NDB
-d
db_name
1631
option), and shows
--type
DataDir
option:
--host
or
option.
--id
--nodeid
Need help?
Do you have a question about the 5.0 and is the answer not in the manual?
Questions and answers