This section provides descriptions of mysqld server options relating to MySQL Cluster. For information about mysqld options not specific to MySQL Cluster, and for general information about the use of options with mysqld, see Server Command Options.
For information about command-line options used with other MySQL
Cluster processes (ndbd,
ndb_mgmd, and ndb_mgm),
see Section 4.23, “Options Common to MySQL Cluster Programs”. For
information about command-line options used with
NDB
utility programs (such as
ndb_desc, ndb_size.pl, and
ndb_show_tables), see
Chapter 4, MySQL Cluster Programs.
Version Introduced | 5.1.23-ndb-6.3.8 | |
Command-Line Format | --ndb-batch-size |
|
Config-File Format | ndb-batch-size |
|
Variable Name | ndb_batch_size |
|
Variable Scope | Global | |
Dynamic Variable | No | |
Permitted Values | ||
Type | numeric |
|
Default | 32768 |
|
Range | 0-31536000 |
This sets the size in bytes that is used for NDB transaction batches.
--ndb-cluster-connection-pool=
#
Version Introduced | 5.1.19-ndb-6.2.2 | |
Command-Line Format | --ndb-cluster-connection-pool |
|
Config-File Format | ndb-cluster-connection-pool |
|
Variable Name | Ndb_cluster_connection_pool |
|
Variable Scope | Global | |
Dynamic Variable | No | |
Permitted Values | ||
Type | numeric |
|
Default | 1 |
|
Range | 1-63 |
By setting this option to a value greater than 1 (the
default), a mysqld process can use
multiple connections to the cluster, effectively mimicking
several SQL nodes. Each connection requires its own
[api]
or [mysqld]
section in the cluster configuration
(config.ini
) file, and counts against
the maximum number of API connections supported by the
cluster.
Suppose that you have 2 cluster host computers, each running
an SQL node whose mysqld process was
started with
--ndb-cluster-connection-pool=4
; this means
that the cluster must have 8 API slots available for these
connections (instead of 2). All of these connections are set
up when the SQL node connects to the cluster, and are
allocated to threads in a round-robin fashion.
This option is useful only when running mysqld on host machines having multiple CPUs, multiple cores, or both. For best results, the value should be smaller than the total number of cores available on the host machine. Setting it to a value greater than this is likely to degrade performance severely.
Because each SQL node using connection pooling occupies multiple API node slots — each slot having its own node ID in the cluster — you must not use a node ID as part of the cluster connect string when starting any mysqld process that employs connection pooling.
Setting a node ID in the connect string when using the
--ndb-cluster-connection-pool
option
causes node ID allocation errors when the SQL node
attempts to connect to the cluster.
This option was introduced in MySQL Cluster NDB 6.2.2. Beginning with MySQL Cluster NDB 6.2.16 and MySQL Cluster NDB 6.3.13, the value used for this option is available as a global status variable (Bug#35573).
--ndb-connectstring=
connect_string
Command-Line Format | --ndb-connectstring |
|
Config-File Format | ndb-connectstring |
|
Permitted Values | ||
Type | string |
When using the NDBCLUSTER
storage engine, this option specifies the management server
that distributes cluster configuration data. See
Section 3.2.3, “The MySQL Cluster Connectstring”, for syntax.
Command-Line Format | --ndbcluster |
|
Config-File Format | ndbcluster |
|
Option Sets Variable | Yes, have_ndbcluster
|
|
Disabled by | skip-ndbcluster |
|
Permitted Values | ||
Type | boolean |
|
Default | FALSE |
The NDBCLUSTER
storage engine
is necessary for using MySQL Cluster. If a
mysqld binary includes support for the
NDBCLUSTER
storage engine, the
engine is disabled by default. Use the
--ndbcluster
option to enable
it. Use --skip-ndbcluster
to explicitly
disable the engine.
Version Introduced | 5.1.15 | |
Command-Line Format | --ndb-nodeid=# |
|
Config-File Format | ndb-nodeid |
|
Variable Name | Ndb_cluster_node_id |
|
Variable Scope | Global | |
Dynamic Variable | No | |
Permitted Values (>= 5.1.5) | ||
Type | numeric |
|
Range | 1-255 |
Set this MySQL server's node ID in a MySQL Cluster.
This can be used instead of specifying the node ID as part
of the connectstring or in the
config.ini
file, or allowing the
cluster to determine an arbitrary node ID. If you use this
option, then --ndb-nodeid
must be specified
before
--ndb-connectstring
. If
--ndb-nodeid
is used
and a node ID is specified in the
connectstring, then the MySQL server will not be able to
connect to the cluster. In addition, if
--nodeid
is used, then either a matching
node ID must be found in a [mysqld]
or
[api]
section of
config.ini
, or there must be an
“open” [mysqld]
or
[api]
section in the file (that is, a
section without an Id
parameter
specified).
Regardless of how the node ID is determined, its is shown as
the value of the global status variable
Ndb_cluster_node_id
in the output of
SHOW STATUS
, and as
cluster_node_id
in the
connection
row of the output of
SHOW ENGINE
NDBCLUSTER STATUS
.
For more information about node IDs for MySQL Cluster SQL nodes, see Section 3.2.7, “Defining SQL and Other API Nodes in a MySQL Cluster”.
Command-Line Format | --skip-ndbcluster |
|
Config-File Format | skip-ndbcluster |
Disable the NDBCLUSTER
storage
engine. This is the default for binaries that were built
with NDBCLUSTER
storage engine
support; the server allocates memory and other resources for
this storage engine only if the
--ndbcluster
option is given
explicitly. See Section 3.1, “Quick Test Setup of MySQL Cluster”, for
an example.