MySQL 5.0 Reference Manual  /  ...  /  MySQL Server Options and Variables for MySQL Cluster

17.3.3.7 MySQL Server Options and Variables for MySQL Cluster

This section provides information about MySQL server options, server and status variables that are specific to MySQL Cluster. For general information on using these, and for other options and variables not specific to MySQL Cluster, see Section 5.1, “The MySQL Server”.

For MySQL Cluster configuration parameters used in the cluster confiuration file (usually named config.ini), see Section 17.3, “MySQL Cluster Configuration”.

17.3.3.7.1 mysqld Command Options for MySQL Cluster

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.20, “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”.

  • --ndbcluster

    Table 17.9 Type and value information for ndbcluster

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndbcluster

    Yes No No
    Yes No
    MySQL 5.0 boolean FALSE

    DESCRIPTION: Enable NDB Cluster (if this version of MySQL supports it)

    Disabled by --skip-ndbcluster


    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.

  • --ndb-connectstring=connection_string

    Table 17.10 Type and value information for ndb-connectstring

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-connectstring

    Yes No No
    Yes No
    MySQL 5.0 string

    DESCRIPTION: Point to the management server that distributes the cluster configuration


    When using the NDBCLUSTER storage engine, this option specifies the management server that distributes cluster configuration data. See Section 17.3.3.2, “MySQL Cluster Connection Strings”, for syntax.

  • --ndb-mgmd-host=host[:port]

    Table 17.11 Type and value information for ndb-mgmd-host

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-mgmd-host

    Yes No No
    Yes No
    MySQL 5.0 string localhost:1186

    DESCRIPTION: Set the host (and port, if desired) for connecting to management server


    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.

  • --ndb-nodeid=#

    Table 17.12 Type and value information for ndb-nodeid

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-nodeid

    Yes No Yes
    Yes Global No
    5.0.45 integer / 1 - 63

    DESCRIPTION: MySQL Cluster node ID for this MySQL server


    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 connection string or in the config.ini file, or permitting 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 connection string, 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 17.3.3.6, “Defining SQL and Other API Nodes in a MySQL Cluster”.

  • --skip-ndbcluster

    Table 17.13 Type and value information for skip-ndbcluster

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    skip-ndbcluster

    Yes No No
    Yes No

    DESCRIPTION: Disable the NDB Cluster storage engine


    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.

17.3.3.7.2 MySQL Cluster System Variables

This section provides detailed information about MySQL server system variables that are specific to MySQL Cluster and the NDB storage engine. For system variables not specific to MySQL Cluster, see Section 5.1.4, “Server System Variables”. For general information on using system variables, see Section 5.1.5, “Using System Variables”.

  • have_ndbcluster

    Table 17.14 Type and value information for have_ndbcluster

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    have_ndbcluster

    No Yes No
    No Global No
    MySQL 5.0 boolean

    DESCRIPTION: Whether mysqld supports NDB Cluster tables (set by --ndbcluster option)


    YES if mysqld supports NDBCLUSTER tables. DISABLED if --skip-ndbcluster is used.

    This variable is deprecated in MySQL 5.1, and is removed in MySQL 5.6. Use SHOW ENGINES instead.

  • ndb_autoincrement_prefetch_sz

    Table 17.15 Type and value information for ndb_autoincrement_prefetch_sz

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb_autoincrement_prefetch_sz

    Yes Yes No
    Yes Both Yes
    MySQL 5.0 integer 32 / 1 - 256
    5.0.56 integer 1 / 1 - 256

    DESCRIPTION: NDB auto-increment prefetch size


    Determines the probability of gaps in an autoincremented column. Set it to 1 to minimize this. Setting it to a high value for optimization—makes inserts faster, but decreases the likelihood that consecutive autoincrement numbers will be used in a batch of inserts. Default value: 32. Minimum value: 1.

    Beginning with MySQL 5.0.56, this variable affects the number of AUTO_INCREMENT IDs that are fetched between statements only. Within a statement, at least 32 IDs are now obtained at a time. In MySQL 5.0.56 and later, the default value is 1. (Bug #31956)

    Important

    This variable does not affect inserts performed using INSERT ... SELECT.

  • ndb_cache_check_time

    Table 17.16 Type and value information for ndb_cache_check_time

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb_cache_check_time

    Yes Yes No
    Yes Global Yes
    MySQL 5.0 integer 0 / -

    DESCRIPTION: Number of milliseconds between checks of cluster SQL nodes made by the MySQL query cache


    The number of milliseconds that elapse between checks of MySQL Cluster SQL nodes by the MySQL query cache. Setting this to 0 (the default and minimum value) means that the query cache checks for validation on every query.

    The recommended maximum value for this variable is 1000, which means that the check is performed once per second. A larger value means that the check is performed and possibly invalidated due to updates on different SQL nodes less often. It is generally not desirable to set this to a value greater than 2000.

  • ndb_force_send

    Table 17.17 Type and value information for ndb_force_send

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb_force_send

    Yes Yes No
    Yes Both Yes
    MySQL 5.0 boolean TRUE

    DESCRIPTION: Forces sending of buffers to NDB immediately, without waiting for other threads


    Forces sending of buffers to NDB immediately, without waiting for other threads. Defaults to ON.

  • ndb_index_stat_cache_entries

    Table 17.18 Type and value information for ndb_index_stat_cache_entries

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb_index_stat_cache_entries

    Yes Yes No
    Yes Both Yes
    MySQL 5.0 integer 32 / 0 - 4294967295

    DESCRIPTION: Sets the granularity of the statistics by determining the number of starting and ending keys


    Sets the granularity of the statistics by determining the number of starting and ending keys to store in the statistics memory cache. Zero means no caching takes place; in this case, the data nodes are always queried directly. Default value: 32.

  • ndb_index_stat_enable

    Table 17.19 Type and value information for ndb_index_stat_enable

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb_index_stat_enable

    Yes Yes No
    Yes Both Yes
    MySQL 5.0 boolean OFF

    DESCRIPTION: Use NDB index statistics in query optimization


    Use NDB index statistics in query optimization. Defaults to ON.

  • ndb_index_stat_update_freq

    Table 17.20 Type and value information for ndb_index_stat_update_freq

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb_index_stat_update_freq

    Yes Yes No
    Yes Both Yes
    MySQL 5.0 integer 20 / 0 - 4294967295

    DESCRIPTION: How often to query data nodes instead of the statistics cache


    How often to query data nodes instead of the statistics cache. For example, a value of 20 (the default) means to direct every 20th query to the data nodes.

  • ndb_optimized_node_selection

    Table 17.21 Type and value information for ndb_optimized_node_selection

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb_optimized_node_selection

    Yes Yes No
    Yes Global No
    MySQL 5.0 boolean ON

    DESCRIPTION: Determines how an SQL node chooses a cluster data node to use as transaction coordinator


    Causes an SQL node to use the closest data node as transaction coordinator. For this purpose, a data node having a shared memory connection with the SQL node is considered to be closest to the SQL node; the next closest (in order of decreasing proximity) are: TCP connection to localhost; SCI connection; TCP connection from a host other than localhost.

    This option is enabled by default. Set to 0 or OFF to disable it, in which case the SQL node uses each data node in the cluster in succession. When this option is disabled each SQL thread attempts to use a given data node 8 times before proceeding to the next one.

  • ndb_report_thresh_binlog_epoch_slip

    Table 17.22 Type and value information for ndb_report_thresh_binlog_epoch_slip

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb_report_thresh_binlog_epoch_slip

    Yes No No
    Yes No
    MySQL 5.0 integer 3 / 0 - 256

    DESCRIPTION: This is a threshold on the number of epochs to be behind before reporting binary log status


    This is a threshold on the number of epochs to be behind before reporting binary log status. For example, a value of 3 (the default) means that if the difference between which epoch has been received from the storage nodes and which epoch has been applied to the binary log is 3 or more, a status message will be sent to the cluster log.

  • ndb_report_thresh_binlog_mem_usage

    Table 17.23 Type and value information for ndb_report_thresh_binlog_mem_usage

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb_report_thresh_binlog_mem_usage

    Yes No No
    Yes No
    MySQL 5.0 integer 10 / 0 - 10

    DESCRIPTION: This is a threshold on the percentage of free memory remaining before reporting binary log status


    This is a threshold on the percentage of free memory remaining before reporting binary log status. For example, a value of 10 (the default) means that if the amount of available memory for receiving binary log data from the data nodes falls below 10%, a status message will be sent to the cluster log.

  • ndb_use_exact_count

    Table 17.24 Type and value information for ndb_use_exact_count

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb_use_exact_count

    No Yes No
    No Both Yes
    MySQL 5.0 boolean ON

    DESCRIPTION: Use exact row count when planning queries


    Forces NDB to use a count of records during SELECT COUNT(*) query planning to speed up this type of query. The default value is ON. For faster queries overall, disable this feature by setting the value of ndb_use_exact_count to OFF.

  • ndb_use_transactions

    Table 17.25 Type and value information for ndb_use_transactions

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb_use_transactions

    Yes Yes No
    Yes Both Yes
    MySQL 5.0 boolean ON

    DESCRIPTION: Forces NDB to use a count of records during SELECT COUNT(*) query planning to speed up this type of query


    You can disable NDB transaction support by setting this variable's values to OFF (not recommended). The default is ON.

17.3.3.7.3 MySQL Cluster Status Variables

This section provides detailed information about MySQL server status variables that relate to MySQL Cluster and the NDB storage engine. For status variables not specific to MySQL Cluster, and for general information on using status variables, see Section 5.1.6, “Server Status Variables”.

  • Handler_discover

    An SQL node can ask the NDB storage engine if it knows about a table with a given name. This is called discovery. Handler_discover indicates the number of times that tables have been discovered using this mechanism.

  • Ndb_cluster_node_id

    If the server is acting as a MySQL Cluster node, then the value of this variable its node ID in the cluster.

    If the server is not part of a MySQL Cluster, then the value of this variable is 0.

  • Ndb_config_from_host

    If the server is part of a MySQL Cluster, the value of this variable is the host name or IP address of the Cluster management server from which it gets its configuration data.

    If the server is not part of a MySQL Cluster, then the value of this variable is an empty string.

    Prior to MySQL 5.0.23, this variable was named Ndb_connected_host.

  • Ndb_config_from_port

    If the server is part of a MySQL Cluster, the value of this variable is the number of the port through which it is connected to the Cluster management server from which it gets its configuration data.

    If the server is not part of a MySQL Cluster, then the value of this variable is 0.

    Prior to MySQL 5.0.23, this variable was named Ndb_connected_port.

  • Ndb_number_of_data_nodes

    If the server is part of a MySQL Cluster, the value of this variable is the number of data nodes in the cluster.

    If the server is not part of a MySQL Cluster, then the value of this variable is 0.

    Prior to MySQL 5.0.29, this variable was named Ndb_number_of_storage_nodes.


User Comments
Sign Up Login You must be logged in to post a comment.