- MySQL 5.1 Reference Manual :: 17 MySQL Cluster NDB 6.X/7.X :: 17.5 Management of MySQL Cluster :: 17.5.8 The ndbinfo MySQL Cluster Information Database
-
- MySQL 5.1 Reference Manual
- Preface, Notes, Licenses
- 1 General Information
- 2 Installing and Upgrading MySQL
- 3 Tutorial
- 4 MySQL Programs
- 5 MySQL Server Administration
- 6 Backup and Recovery
- 7 Optimization
- 8 Language Structure
- 9 Internationalization and Localization
- 10 Data Types
- 11 Functions and Operators
- 12 SQL Statement Syntax
- 13 Storage Engines
- 14 High Availability and Scalability
- 15 MySQL Enterprise Monitor
- 16 Replication
- 17 MySQL Cluster NDB 6.X/7.X
- 18 Partitioning
- 19 Stored Programs and Views
- 20 INFORMATION_SCHEMA Tables
- 21 Connectors and APIs
- 22 Extending MySQL
- A MySQL 5.1 Frequently Asked Questions
- B Errors, Error Codes, and Common Problems
- C MySQL Change History
- D Restrictions and Limits
- Index
- Standard Index
- C Function Index
- Command Index
- Function Index
- INFORMATION_SCHEMA Index
- Transaction Isolation Level Index
- JOIN Types Index
- Operator Index
- Option Index
- Privileges Index
- SQL Modes Index
- Status Variable Index
- Statement/Syntax Index
- System Variable Index
[+/-]
- 17.5.8.1. The
ndbinfo blocks
Table - 17.5.8.2. The
ndbinfo config_params
Table - 17.5.8.3. The
ndbinfo counters
Table - 17.5.8.4. The
ndbinfo logbuffers
Table - 17.5.8.5. The
ndbinfo logspaces
Table - 17.5.8.6. The
ndbinfo memoryusage
Table - 17.5.8.7. The
ndbinfo nodes
Table - 17.5.8.8. The
ndbinfo pools
Table - 17.5.8.9. The
ndbinfo resources
Table - 17.5.8.10. The
ndbinfo transporters
Table
ndbinfo
is a database storing containing information specific to MySQL Cluster, available beginning with MySQL Cluster NDB 7.1.1.This database contains a number of tables, each providing a different sort of data about MySQL 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 MySQL 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 | | partition | ACTIVE | STORAGE ENGINE | NULL | GPL | | ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | GPL | | BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | GPL | | CSV | ACTIVE | STORAGE ENGINE | NULL | GPL | | FEDERATED | DISABLED | STORAGE ENGINE | NULL | GPL | | MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL | | InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL | | MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL | | MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL | | ndbcluster | ACTIVE | STORAGE ENGINE | NULL | GPL | | ndbinfo | ACTIVE | STORAGE ENGINE | NULL | GPL | +------------+----------+----------------+---------+---------+ 12 rows in set (0.00 sec)You can also do this by checking the output of
SHOW ENGINES
for a line includingndbinfo
in theEngine
column andYES
in theSupport
column, as shown here (emphasized text):mysql>
SHOW ENGINES;
+------------+---------+----------------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +------------+---------+----------------------------------------------------------------+--------------+------+------------+ | ndbcluster | YES | Clustered, fault-tolerant tables | YES | NO | NO | | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | | ndbinfo | YES | MySQL Cluster system information storage engine | NO | NO | NO | | CSV | YES | CSV storage engine | NO | NO | NO | | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | | FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL | | ARCHIVE | YES | Archive storage engine | NO | NO | NO | | InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES | | MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO | | BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO | +------------+---------+----------------------------------------------------------------+--------------+------+------------+ 10 rows in set (0.00 sec)If
ndbinfo
support is enabled, then you can accessndbinfo
via SQL statements in mysql or another MySQL client. For example, you can seendbinfo
listed in the output ofSHOW DATABASES
, as shown here:mysql>
SHOW DATABASES;
+--------------------+ | Database | +--------------------+ | information_schema | | mysql | | ndbinfo | | test | +--------------------+ 4 rows in set (0.00 sec)If the mysqld process was not started with the
--ndbcluster
option,ndbinfo
is not available and is not displayed bySHOW DATABASES
. If mysqld was formerly connected to a MySQL 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 with Got error 157 'Connection to NDB failed' from NDBINFO.Note
With the exception of the
blocks
andconfig_params
tables, what we refer to as ndbinfo “tables” are actually views generated from internalNDB
tables not visible to the MySQL Server.All
ndbinfo
tables are read-only.You can select the
ndbinfo
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 changed mysql>SHOW TABLES;
+-------------------+ | Tables_in_ndbinfo | +-------------------+ | blocks | | config_params | | counters | | logbuffers | | logspaces | | memoryusage | | nodes | | resources | | transporters | +-------------------+ 9 rows in set (0.00 sec)Note
In early versions of MySQL Cluster NDB 7.1, there were 10 tables in the
ndbinfo
database; however, thepools
table was removed in MySQL Cluster NDB 7.1.3. See Section 17.5.8.8, “Thendbinfo pools
Table”.You can execute
SELECT
statements against these tables, just as you would normally expect:mysql>
SELECT * FROM memoryusage;
+---------+--------------+------+-------+ | node_id | DATA_MEMORY | used | max | +---------+--------------+------+-------+ | 1 | DATA_MEMORY | 3230 | 6408 | | 2 | DATA_MEMORY | 3230 | 6408 | | 1 | INDEX_MEMORY | 16 | 12832 | | 2 | INDEX_MEMORY | 16 | 12832 | +---------+--------------+------+-------+ 4 rows in set (0.37 sec)More complex queries are possible, as shown here:
mysql>
SELECT SUM(used) as 'Data Memory Used, All Nodes'
>FROM memoryusage
>WHERE DATA_MEMORY = '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 DATA_MEMORY = '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 lower case. 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