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 Section 5.1.3, “Server Command Options”.
For information about command-line options used with other MySQL
Cluster processes (ndbd,
ndb_mgmd, and ndb_mgm),
see Section 17.4.24, “Options Common to MySQL Cluster Programs — 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
Section 17.4, “MySQL Cluster Programs”.
| Command-Line Format | --ndb-batch-size | ||
| Option-File Format | ndb-batch-size | ||
| System 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=
#
| Command-Line Format | --ndb-cluster-connection-pool | ||
| Option-File Format | ndb-cluster-connection-pool | ||
| Status Variable Name | Ndb_cluster_connection_pool | ||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| System 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 connectstring when starting any mysqld process that employs connection pooling.
Setting a node ID in the connectstring when using the
--ndb-cluster-connection-pool option
causes node ID allocation errors when the SQL node
attempts to connect to the cluster.
In some older releases of MySQL Cluster prior to MySQL Cluster NDB 7.2, there was also a separate status variable corresponding to this option; however, the status variable was removed as redundant as of these versions. (Bug #60119)
--ndb-blob-read-batch-bytes=
bytes
| Command-Line Format | --ndb-blob-read-batch-bytes | ||
| Option-File Format | ndb-blob-read-batch-bytes | ||
| System Variable Name | ndb_blob_read_batch_bytes | ||
| Variable Scope | Global, Session | ||
| Dynamic Variable | Yes | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 65535 | ||
| Range | 0 .. 4294967295 | ||
This option can be used to set the size (in bytes) for
batching of BLOB data reads
in MySQL Cluster applications. When this batch size is
exceeded by the amount of
BLOB data to be read within
the current transaction, any pending
BLOB read operations are
immediately executed.
The maximum value for this option is 4294967295; the default
is 65535. Setting it to 0 has the effect of disabling
BLOB read batching.
In NDB API applications, you can control
BLOB write batching with
the
setMaxPendingBlobReadBytes()
and
getMaxPendingBlobReadBytes()
methods.
--ndb-blob-write-batch-bytes=
bytes
| Command-Line Format | --ndb-blob-write-batch-bytes | ||
| Option-File Format | ndb-blob-write-batch-bytes | ||
| System Variable Name | ndb_blob_write_batch_bytes | ||
| Variable Scope | Global, Session | ||
| Dynamic Variable | Yes | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 65535 | ||
| Range | 0 .. 4294967295 | ||
This option can be used to set the size (in bytes) for
batching of BLOB data writes
in MySQL Cluster applications. When this batch size is
exceeded by the amount of
BLOB data to be written
within the current transaction, any pending
BLOB write operations are
immediately executed.
The maximum value for this option is 4294967295; the default
is 65535. Setting it to 0 has the effect of disabling
BLOB write batching.
In NDB API applications, you can control
BLOB write batching with
the
setMaxPendingBlobWriteBytes()
and
getMaxPendingBlobWriteBytes()
methods.
--ndb-connectstring=
connect_string
| Command-Line Format | --ndb-connectstring | ||
| Option-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 17.3.2.3, “The MySQL Cluster Connectstring”, for syntax.
--ndb-deferred-constraints=[TRUE|FALSE]
| Command-Line Format | --ndb-deferred-constraints | ||
| Option-File Format | ndb-deferred-constraints | ||
| System Variable Name | ndb_deferred_constraints | ||
| Variable Scope | Global, Session | ||
| Dynamic Variable | Yes | ||
| Permitted Values | |||
| Type | boolean | ||
| Default | false | ||
Controls whether or not constraint checks on unique indexes
are deferred until commit time, where such checks are
supported. OFF is the default.
This option is not normally needed for operation of MySQL Cluster or MySQL Cluster Replication, and is intended primarily for use in testing.
--ndb-distribution=[KEYHASH|LINHASH]
| Command-Line Format | --ndb-distribution={KEYHASH|LINHASH} | ||
| Option-File Format | ndb-distribution | ||
| System Variable Name | ndb_distribution | ||
| Variable Scope | Global, Session | ||
| Dynamic Variable | Yes | ||
| Permitted Values | |||
| Type | enumeration | ||
| Default | KEYHASH | ||
| Valid Values | LINHASH | ||
KEYHASH | |||
Controls the default distribution method for
NDB tables. Can be set to
either of KEYHASH (key hashing) or
LINHASH (linear hashing).
KEYHASH is the default.
| Command-Line Format | --ndb-mgmd-host=host[:port] | ||
| Option-File Format | ndb-mgmd-host | ||
| Permitted Values | |||
| Type | string | ||
| Default | localhost:1186 | ||
Can be used to set the host and port number of a single
management server for the program to connect to. If the
program requires node IDs or references to multiple
management servers (or both) in its connection information,
use the --ndb-connectstring
option instead.
| Command-Line Format | --ndbcluster | ||
| Option-File Format | 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.
| Command-Line Format | --ndb-log-apply-status | ||
| Option-File Format | ndb-log-apply-status | ||
| System Variable Name | ndb_log_apply_status | ||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Permitted Values | |||
| Type | boolean | ||
| Default | OFF | ||
Causes a slave mysqld to log any updates
received from its immediate master to the
mysql.ndb_apply_status table in its own
binary log using its own server ID rather than the server ID
of the master. In a circular or chain replication setting,
this allows such updates to propagate to the
mysql.ndb_apply_status tables of any
MySQL servers configured as slaves of the current
mysqld.
In a chain replication setup, using this option allows downstream (slave) clusters to be aware of their positions relative to all of their upstream contributors (masters).
In a circular replication setup, this option causes changes
to ndb_apply_status tables to complete
the entire circuit, eventually propagating back to the
originating MySQL Cluster. This also allows a cluster acting
as a master to see when its changes (epochs) have been
applied to the other clusters in the circle.
This option has no effect unless the MySQL server is started
with the --ndbcluster option.
| Command-Line Format | --ndb-log-orig | ||
| Option-File Format | ndb-log-orig | ||
| System Variable Name | ndb_log_orig | ||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Permitted Values | |||
| Type | boolean | ||
| Default | OFF | ||
Log the originating server ID and epoch in the
ndb_binlog_index table.
Note that this makes it possible for a given epoch to have
multiple rows in ndb_binlog_index, one
for each originating epoch.
For more information, see Section 17.6.4, “MySQL Cluster Replication Schema and Tables”.
| Introduced | 5.5.15-ndb-7.2.1 | ||
| Command-Line Format | --ndb-log-transaction-id[={0|1}] | ||
| Option-File Format | ndb-log-transaction-id | ||
| System Variable Name | ndb_log_transaction_id | ||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Permitted Values | |||
| Type | boolean | ||
| Default | OFF | ||
Causes a slave mysqld to write the NDB
transaction ID in each row of the binary log. Such logging
requires the use of the Version 2 event format for the
binary log; thus,
--log-bin-use-v1-row-events
must be set to FALSE in order to use this
option.
This option is available beginning with MySQL Cluster NDB
7.2.1 (and is not supported in mainline MySQL Server
5.5). It is required to enable MySQL Cluster
Replication conflict detection and resolution using the
NDB$EPOCH_TRANS() function introduced in
the same MySQL Cluster release.
The default value is FALSE.
For more information, see Section 17.6.11, “MySQL Cluster Replication Conflict Resolution”.
| Command-Line Format | --ndb-nodeid=# | ||
| Option-File Format | ndb-nodeid | ||
| Status Variable Name | Ndb_cluster_node_id | ||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Permitted Values | |||
| Type | numeric | ||
| Range | 1 .. 255 | ||
Set this MySQL server's node ID in a MySQL Cluster.
The --ndb-nodeid option overrides any node
ID set with
--ndb-connectstring,
regardless of the order in which the two options are used.
In addition, if --ndb-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 a NodeId or
Id parameter specified). This is also
true if the node ID is specified as part of the
connectstring.
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 17.3.2.7, “Defining SQL and Other API Nodes in a MySQL Cluster”.
| Command-Line Format | --ndb-log-empty-epochs | ||
| Option-File Format | ndb-log-empty-epochs | ||
| System Variable Name | ndb_log_empty_epochs | ||
| Variable Scope | Global | ||
| Dynamic Variable | Yes | ||
| Permitted Values | |||
| Type | boolean | ||
| Default | OFF | ||
Causes epochs during which there were no changes to be
written to the ndb_apply_status and
ndb_binlog_index tables, even when
--log-slave-updates is
enabled.
By default this option is disabled. Disabling
--ndb-log-empty-epochs causes epoch
transactions with no changes not to be written to the binary
log, although a row is still written even for an empty epoch
in ndb_binlog_index.
Because --ndb-log-empty-epochs=1 causes the
size of ndb_binlog_index table to
increase independently of the size of the binary log, users
should be prepared to manage the growth of this table, even
if they expect the cluster to be idle a large part of the
time.
| Command-Line Format | --server-id-bits=# | ||
| Option-File Format | server-id-bits | ||
| System Variable Name | server_id_bits | ||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 32 | ||
| Range | 7 .. 32 | ||
This option indicates the number of least significant bits
within the 32-bit server_id
which actually identify the server. Indicating that the
server is actually identified by fewer than 32 bits makes it
possible for some of the remaining bits to be used for other
purposes, such as storing user data generated by
applications using the NDB API's Event API within the
AnyValue of an
OperationOptions structure
(MySQL Cluster uses the AnyValue to store
the server ID).
When extracting the effective server ID from
server_id for purposes such
as detection of replication loops, the server ignores the
remaining bits. The --server-id-bits option
is used to mask out any irrelevant bits of
server_id in the IO and SQL
threads when deciding whether an event should be ignored
based on the server ID.
This data can be read from the binary log by
mysqlbinlog, provided that it is run with
its own --server-id-bits
option set to 32 (the default).
The value of server_id must
be less than 2 ^
server_id_bits; otherwise,
mysqld refuses to start.
This system variable is supported only by MySQL Cluster. It is not supported in the standard MySQL 5.5 Server.
| Command-Line Format | --skip-ndbcluster | ||
| Option-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 17.3.1, “Quick Test Setup of MySQL Cluster”, for
an example.
ndb-transid-mysql-connection-map=
state
| Introduced | 5.5.16-ndb-7.2.2 | ||
| Command-Line Format | --ndb-transid-mysql-connection-map[=state] | 5.1.16-ndb-7.1.17 | |
| Permitted Values | |||
| Type | enumeration | ||
| Default | ON | ||
| Valid Values | OFF | ||
FORCE | |||
Enables or disables the plugin that handles the
ndb_transid_mysql_connection_map
table in the INFORMATION_SCHEMA database.
Takes one of the values ON,
OFF, or FORCE.
ON (the default) enables the plugin.
OFF disables the plugin, which makes
ndb_transid_mysql_connection_map
inaccessible. FORCE keeps the MySQL
Server from starting if the plugin fails to load and start.
You can see whether the
ndb_transid_mysql_connection_map
table plugin is running by checking the output of
SHOW PLUGINS.
This option was added in MySQL Cluster NDB 7.2.2.
| Command-Line Format | --ndb-wait-connected=# | ||
| Option-File Format | ndb-wait-connected | ||
| System Variable Name | ndb_wait_connected | ||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 0 | ||
| Range | 0 .. 31536000 | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 0 | ||
| Range | 0 .. 31536000 | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 30 | ||
| Range | 0 .. 31536000 | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 30 | ||
| Range | 0 .. 31536000 | ||
This option sets the period of time that the MySQL server
waits for connections to MySQL Cluster management and data
nodes to be established before accepting MySQL client
connections. The time is specified in seconds. The default
value is 30.
| Command-Line Format | --ndb-wait-setup=# | ||
| Option-File Format | ndb-wait-setup | ||
| System Variable Name | ndb_wait_setup | ||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 15 | ||
| Range | 0 .. 31536000 | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 15 | ||
| Range | 0 .. 31536000 | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 30 | ||
| Range | 0 .. 31536000 | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 30 | ||
| Range | 0 .. 31536000 | ||
This variable shows the period of time that the MySQL server
waits for the NDB storage
engine to complete setup before timing out and treating
NDB as unavailable. The time is
specified in seconds. The default value is
30.
--ndb_optimization_delay=
milliseconds
| System Variable Name | ndb_optimization_delay | ||
| Variable Scope | Global | ||
| Dynamic Variable | Yes | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 10 | ||
| Range | 0 .. 100000 | ||
Set the number of milliseconds to wait between sets of rows
by OPTIMIZE TABLE statements
on NDB tables. The default is
15.

User Comments
Add your own comment.