Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.1Mb
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  / ...  / MySQL NDB Cluster 7.5 and NDB Cluster 7.6  / Management of NDB Cluster  /  ndbinfo: The NDB Cluster Information Database

21.6.15 ndbinfo: The NDB Cluster Information Database

21.6.15.1 The ndbinfo arbitrator_validity_detail Table
21.6.15.2 The ndbinfo arbitrator_validity_summary Table
21.6.15.3 The ndbinfo blocks Table
21.6.15.4 The ndbinfo cluster_locks Table
21.6.15.5 The ndbinfo cluster_operations Table
21.6.15.6 The ndbinfo cluster_transactions Table
21.6.15.7 The ndbinfo config_nodes Table
21.6.15.8 The ndbinfo config_params Table
21.6.15.9 The ndbinfo config_values Table
21.6.15.10 The ndbinfo counters Table
21.6.15.11 The ndbinfo cpustat Table
21.6.15.12 The ndbinfo cpustat_50ms Table
21.6.15.13 The ndbinfo cpustat_1sec Table
21.6.15.14 The ndbinfo cpustat_20sec Table
21.6.15.15 The ndbinfo dict_obj_info Table
21.6.15.16 The ndbinfo dict_obj_types Table
21.6.15.17 The ndbinfo disk_write_speed_base Table
21.6.15.18 The ndbinfo disk_write_speed_aggregate Table
21.6.15.19 The ndbinfo disk_write_speed_aggregate_node Table
21.6.15.20 The ndbinfo diskpagebuffer Table
21.6.15.21 The ndbinfo error_messages Table
21.6.15.22 The ndbinfo locks_per_fragment Table
21.6.15.23 The ndbinfo logbuffers Table
21.6.15.24 The ndbinfo logspaces Table
21.6.15.25 The ndbinfo membership Table
21.6.15.26 The ndbinfo memoryusage Table
21.6.15.27 The ndbinfo memory_per_fragment Table
21.6.15.28 The ndbinfo nodes Table
21.6.15.29 The ndbinfo operations_per_fragment Table
21.6.15.30 The ndbinfo processes Table
21.6.15.31 The ndbinfo resources Table
21.6.15.32 The ndbinfo restart_info Table
21.6.15.33 The ndbinfo server_locks Table
21.6.15.34 The ndbinfo server_operations Table
21.6.15.35 The ndbinfo server_transactions Table
21.6.15.36 The ndbinfo table_distribution_status Table
21.6.15.37 The ndbinfo table_fragments Table
21.6.15.38 The ndbinfo table_info Table
21.6.15.39 The ndbinfo table_replicas Table
21.6.15.40 The ndbinfo tc_time_track_stats Table
21.6.15.41 The ndbinfo threadblocks Table
21.6.15.42 The ndbinfo threads Table
21.6.15.43 The ndbinfo threadstat Table
21.6.15.44 The ndbinfo transporters Table

ndbinfo is a database containing information specific to NDB Cluster.

This database contains a number of tables, each providing a different sort of data about NDB Cluster node status, resource usage, and operations. You can find more detailed information about each of these tables in the next several sections.

ndbinfo is included with NDB Cluster support in the MySQL Server; no special compilation or configuration steps are required; the tables are created by the MySQL Server when it connects to the cluster. You can verify thatndbinfo support is active in a given MySQL Server instance usingSHOW PLUGINS; ifndbinfo support is enabled, you should see a row containingndbinfo in theName column andACTIVE in theStatus column, as shown here (emphasized text):

mysql> SHOW PLUGINS;+----------------------------------+--------+--------------------+---------+---------+| Name                             | Status | Type               | Library | License |+----------------------------------+--------+--------------------+---------+---------+| binlog                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     || mysql_native_password            | ACTIVE | AUTHENTICATION     | NULL    | GPL     || sha256_password                  | ACTIVE | AUTHENTICATION     | NULL    | GPL     || MRG_MYISAM                       | ACTIVE | STORAGE ENGINE     | NULL    | GPL     || MEMORY                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     || CSV                              | ACTIVE | STORAGE ENGINE     | NULL    | GPL     || MyISAM                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     || InnoDB                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     || INNODB_TRX                       | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_LOCKS                     | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_LOCK_WAITS                | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_CMP                       | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_CMP_RESET                 | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_CMPMEM                    | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_CMPMEM_RESET              | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_CMP_PER_INDEX             | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_CMP_PER_INDEX_RESET       | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_BUFFER_PAGE               | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_BUFFER_PAGE_LRU           | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_BUFFER_POOL_STATS         | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_TEMP_TABLE_INFO           | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_METRICS                   | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_FT_DEFAULT_STOPWORD       | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_FT_DELETED                | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_FT_BEING_DELETED          | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_FT_CONFIG                 | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_FT_INDEX_CACHE            | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_FT_INDEX_TABLE            | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_SYS_TABLES                | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_SYS_TABLESTATS            | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_SYS_INDEXES               | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_SYS_COLUMNS               | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_SYS_FIELDS                | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_SYS_FOREIGN               | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_SYS_FOREIGN_COLS          | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_SYS_TABLESPACES           | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_SYS_DATAFILES             | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || INNODB_SYS_VIRTUAL               | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || PERFORMANCE_SCHEMA               | ACTIVE | STORAGE ENGINE     | NULL    | GPL     || ndbCluster                      | ACTIVE | STORAGE ENGINE     | NULL    | GPL     || ndbinfo                          | ACTIVE | STORAGE ENGINE     | NULL    | GPL     || ndb_transid_mysql_connection_map | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     || BLACKHOLE                        | ACTIVE | STORAGE ENGINE     | NULL    | GPL     || ARCHIVE                          | ACTIVE | STORAGE ENGINE     | NULL    | GPL     || partition                        | ACTIVE | STORAGE ENGINE     | NULL    | GPL     || ngram                            | ACTIVE | FTPARSER           | NULL    | GPL     |+----------------------------------+--------+--------------------+---------+---------+46 rows in set (0.00 sec)

You can also do this by checking the output ofSHOW ENGINES for a line includingndbinfo in theEngine column andYES in theSupport column, as shown here (emphasized text):

mysql> SHOW ENGINES\G*************************** 1. row ***************************      Engine: ndbcluster     Support: YES     Comment: Clustered, fault-tolerant tablesTransactions: YES          XA: NO  Savepoints: NO*************************** 2. row ***************************      Engine: CSV     Support: YES     Comment: CSV storage engineTransactions: NO          XA: NO  Savepoints: NO*************************** 3. row ***************************      Engine: InnoDB     Support: DEFAULT     Comment: Supports transactions, row-level locking, and foreign keysTransactions: YES          XA: YES  Savepoints: YES*************************** 4. row ***************************      Engine: BLACKHOLE     Support: YES     Comment: /dev/null storage engine (anything you write to it disappears)Transactions: NO          XA: NO  Savepoints: NO*************************** 5. row ***************************      Engine: MyISAM     Support: YES     Comment: MyISAM storage engineTransactions: NO          XA: NO  Savepoints: NO*************************** 6. row ***************************      Engine: MRG_MYISAM     Support: YES     Comment: Collection of identical MyISAM tablesTransactions: NO          XA: NO  Savepoints: NO*************************** 7. row ***************************      Engine: ARCHIVE     Support: YES     Comment: Archive storage engineTransactions: NO          XA: NO  Savepoints: NO*************************** 8. row ***************************      Engine: ndbinfo     Support: YES     Comment: NDB Cluster system information storage engineTransactions: NO          XA: NO  Savepoints: NO*************************** 9. row ***************************      Engine: PERFORMANCE_SCHEMA     Support: YES     Comment: Performance SchemaTransactions: NO          XA: NO  Savepoints: NO*************************** 10. row ***************************      Engine: MEMORY     Support: YES     Comment: Hash based, stored in memory, useful for temporary tablesTransactions: NO          XA: NO  Savepoints: NO10 rows in set (0.00 sec)

Ifndbinfo support is enabled, then you can accessndbinfo using SQL statements inmysql or another MySQL client. For example, you can seendbinfo listed in the output ofSHOW DATABASES, as shown here (emphasized text):

mysql> SHOW DATABASES;+--------------------+| Database           |+--------------------+| information_schema || mysql              || ndbinfo            || performance_schema || sys                |+--------------------+5 rows in set (0.04 sec)

If themysqld process was not started with the--ndbcluster option,ndbinfo is not available and is not displayed bySHOW DATABASES. Ifmysqld was formerly connected to an NDB Cluster but the cluster becomes unavailable (due to events such as cluster shutdown, loss of network connectivity, and so forth),ndbinfo and its tables remain visible, but an attempt to access any tables (other thanblocks orconfig_params) fails withGot error 157 'Connection to NDB failed' from NDBINFO.

With the exception of theblocks andconfig_params tables, what we refer to asndbinfotables are actually views generated from internalNDB tables not normally visible to the MySQL Server. You can make these tables visible by setting thendbinfo_show_hidden system variable toON (or1), but this is normally not necessary.

Allndbinfo tables are read-only, and are generated on demand when queried. Because many of them are generated in parallel by the data nodes while other are specific to a given SQL node, they are not guaranteed to provide a consistent snapshot.

In addition, pushing down of joins is not supported onndbinfo tables; so joining largendbinfo tables can require transfer of a large amount of data to the requesting API node, even when the query makes use of aWHERE clause.

ndbinfo tables are not included in the query cache. (Bug #59831)

You can select thendbinfo database with aUSE statement, and then issue aSHOW TABLES statement to obtain a list of tables, just as for any other database, like this:

mysql> USE ndbinfo;Database changedmysql> SHOW TABLES;+---------------------------------+| Tables_in_ndbinfo               |+---------------------------------+| arbitrator_validity_detail      || arbitrator_validity_summary     || blocks                          || cluster_locks                   || cluster_operations              || cluster_transactions            || config_nodes                    || config_params                   || config_values                   || counters                        || cpustat                         || cpustat_1sec                    || cpustat_20sec                   || cpustat_50ms                    || dict_obj_info                   || dict_obj_types                  || disk_write_speed_aggregate      || disk_write_speed_aggregate_node || disk_write_speed_base           || diskpagebuffer                  || error_messages                  || locks_per_fragment              || logbuffers                      || logspaces                       || membership                      || memory_per_fragment             || memoryusage                     || nodes                           || operations_per_fragment         || processes                       || resources                       || restart_info                    || server_locks                    || server_operations               || server_transactions             || table_distribution_status       || table_fragments                 || table_info                      || table_replicas                  || tc_time_track_stats             || threadblocks                    || threads                         || threadstat                      || transporters                    |+---------------------------------+44 rows in set (0.00 sec)

In NDB 7.5.0 (and later), allndbinfo tables use theNDB storage engine; however, anndbinfo entry still appears in the output ofSHOW ENGINES andSHOW PLUGINS as described previously.

Theconfig_values table was added in NDB 7.5.0.

Thecpustat,cpustat_50ms,cpustat_1sec,cpustat_20sec, andthreads tables were added in NDB 7.5.2.

Thecluster_locks,locks_per_fragment, andserver_locks tables were added in NDB 7.5.3.

Thedict_obj_info,table_distribution_status,table_fragments,table_info, andtable_replicas tables were added in NDB 7.5.4.

Theconfig_nodes andprocesses tables were added in NDB 7.5.7.

Theerror_messages table was added in NDB 7.6.

You can executeSELECT statements against these tables, just as you would normally expect:

mysql> SELECT * FROM memoryusage;+---------+---------------------+--------+------------+------------+-------------+| node_id | memory_type         | used   | used_pages | total      | total_pages |+---------+---------------------+--------+------------+------------+-------------+|       5 | Data memory         | 753664 |         23 | 1073741824 |       32768 ||       5 | Index memory        | 163840 |         20 | 1074003968 |      131104 ||       5 | Long message buffer |   2304 |          9 |   67108864 |      262144 ||       6 | Data memory         | 753664 |         23 | 1073741824 |       32768 ||       6 | Index memory        | 163840 |         20 | 1074003968 |      131104 ||       6 | Long message buffer |   2304 |          9 |   67108864 |      262144 |+---------+---------------------+--------+------------+------------+-------------+6 rows in set (0.02 sec)

More complex queries, such as the two followingSELECT statements using thememoryusage table, are possible:

mysql> SELECT SUM(used) as 'Data Memory Used, All Nodes'     >     FROM memoryusage     >     WHERE memory_type = 'Data memory';+-----------------------------+| Data Memory Used, All Nodes |+-----------------------------+|                        6460 |+-----------------------------+1 row in set (0.37 sec)mysql> SELECT SUM(max) as 'Total IndexMemory Available'     >     FROM memoryusage     >     WHERE memory_type = 'Index memory';+-----------------------------+| Total IndexMemory Available |+-----------------------------+|                       25664 |+-----------------------------+1 row in set (0.33 sec)

ndbinfo table and column names are case-sensitive (as is the name of thendbinfo database itself). These identifiers are in lowercase. Trying to use the wrong lettercase results in an error, as shown in this example:

mysql> SELECT * FROM nodes;+---------+--------+---------+-------------+| node_id | uptime | status  | start_phase |+---------+--------+---------+-------------+|       1 |  13602 | STARTED |           0 ||       2 |     16 | STARTED |           0 |+---------+--------+---------+-------------+2 rows in set (0.04 sec)mysql> SELECT * FROM Nodes;ERROR 1146 (42S02): Table 'ndbinfo.Nodes' doesn't exist

mysqldump ignores thendbinfo database entirely, and excludes it from any output. This is true even when using the--databases or--all-databases option.

NDB Cluster also maintains tables in theINFORMATION_SCHEMA information database, including theFILES table which contains information about files used for NDB Cluster Disk Data storage, and thendb_transid_mysql_connection_map table, which shows the relationships between transactions, transaction coordinators, and NDB Cluster API nodes. For more information, see the descriptions of the tables orSection 21.6.16, “INFORMATION_SCHEMA Tables for NDB Cluster”.