25.6 NDB 集群管理
- 25.6.1 NDB 集群管理客户端中的命令
- 25.6.2 NDB 集群日志消息
- 25.6.3 NDB 集群中生成的事件报告
- 25.6.4 NDB 集群启动阶段摘要
- 25.6.5 执行 NDB 集群的滚动重启
- 25.6.6 NDB 集群单用户模式
- 25.6.7 在线添加 NDB 集群数据节点
- 25.6.8 NDB 集群的在线备份
- 25.6.9 将数据导入 MySQL 集群
- 25.6.10 NDB 集群的 MySQL 服务器用法
- 25.6.11 NDB Cluster Disk Data 表
- 25.6.12 在 NDB 集群中使用 ALTER TABLE 进行在线操作
- 25.6.13 权限同步和 NDB_STORED_USER
- 25.6.14 NDB 集群的文件系统加密
- 25.6.15 NDB 集群的 TLS 链路加密
- 25.6.16 NDB API 统计计数器和变量
- 25.6.17 ndbinfo:NDB 集群信息数据库
- 25.6.18 INFORMATION_SCHEMA 表 for NDB Cluster
- 25.6.19 NDB 集群和性能模式
- 25.6.20 Quick Reference: NDB Cluster SQL 语句
- 25.6.21 NDB Cluster 安全性 Issues
Managing an NDB Cluster involves a number of tasks, the first of which is to configure and start NDB Cluster. This is covered in Section 25.4, “Configuration of NDB Cluster”, and Section 25.5, “NDB Cluster Programs”.
The next few sections cover the management of a running NDB Cluster.
For information about security issues relating to management and deployment of an NDB Cluster, see Section 25.6.21, “NDB Cluster Security Issues”.
There are essentially two methods of actively managing a running NDB Cluster. The first of these is through the use of commands entered into the management client whereby cluster status can be checked, log levels changed, backups started and stopped, and nodes stopped and started. The second method involves studying the contents of the cluster log ndb_
; this is usually found in the management server's node_id
_cluster.logDataDir
directory, but this location can be overridden using the LogDestination
option. (Recall that node_id
represents the unique identifier of the node whose activity is being logged.) The cluster log contains event reports generated by ndbd. It is also possible to send cluster log entries to a Unix system log.
Some aspects of the cluster's operation can be also be monitored from an SQL node using the SHOW ENGINE NDB STATUS
statement.
More detailed information about NDB Cluster operations is available in real time through an SQL interface using the ndbinfo
database. For more information, see Section 25.6.17, “ndbinfo: The NDB Cluster Information Database”.
NDB statistics counters provide improved monitoring using the mysql client. These counters, implemented in the NDB kernel, relate to operations performed by or affecting Ndb
objects, such as starting, closing, and aborting transactions; primary key and unique key operations; table, range, and pruned scans; blocked threads waiting for various operations to complete; and data and events sent and received by NDB Cluster. The counters are incremented by the NDB kernel whenever NDB API calls are made or data is sent to or received by the data nodes.
mysqld exposes the NDB API statistics counters as system status variables, which can be identified from the prefix common to all of their names (Ndb_api_
). The values of these variables can be read in the mysql client from the output of a SHOW STATUS
statement, or by querying either the Performance Schema session_status
or global_status
table. By comparing the values of the status variables before and after the execution of an SQL statement that acts on NDB
tables, you can observe the actions taken on the NDB API level that correspond to this statement, which can be beneficial for monitoring and performance tuning of NDB Cluster.
MySQL Cluster Manager provides an advanced command-line interface that simplifies many otherwise complex NDB Cluster management tasks, such as starting, stopping, or restarting an NDB Cluster with a large number of nodes. The MySQL Cluster Manager client also supports commands for getting and setting the values of most node configuration parameters as well as mysqld server options and variables relating to NDB Cluster. See MySQL Cluster Manager 8.4.0 User Manual, for more information.