Got error 157 'Connection to NDB failed' from NDBINFO

mysql> use ndbinfo;
120405 13:53:37 [Warning] NDB: Could not acquire global schema lock (4009)Cluster Failure
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed


当mysql集群中管理节点故障,如ndb处于没有启动,shutdown,或网络异常的情况下。访问ndbifno中的表会出现错误

'Got error 157 'Connection to NDB failed' from NDBINFO'.(blocks,config_params除外)。

mysql> select count(1) from blocks;
+----------+
| count(1) |
+----------+
|       23 |
+----------+
1 row in set (0.00 sec)

mysql> select count(1) from config_params;
+----------+
| count(1) |
+----------+
|      126 |
+----------+
1 row in set (0.00 sec)

mysql> select count(1) from nodes;
ERROR 1296 (HY000): Got error 157 'Connection to NDB failed' from NDBINFO



此时我们可以看到一些以ndb$开头的表,这些表有助于我们进一步研究mysql的ndbcluster。在不能访问NDB_MGM的情况下,是不能访问ndb$表的。

mysql> show tables;
120405 13:53:41 [Warning] NDB: Could not acquire global schema lock (4009)Cluster Failure
+---------------------------+
| Tables_in_ndbinfo         |
+---------------------------+
| blocks                    |
| cluster_operations        |
| cluster_transactions      |
| config_params             |
| counters                  |
| diskpagebuffer            |
| logbuffers                |
| logspaces                 |
| memoryusage               |
| ndb$columns               |
| ndb$counters              |
| ndb$dblqh_tcconnect_state |
| ndb$dbtc_apiconnect_state |
| ndb$diskpagebuffer        |
| ndb$logbuffers            |
| ndb$logspaces             |
| ndb$nodes                 |
| ndb$operations            |
| ndb$pools                 |
| ndb$resources             |
| ndb$tables                |
| ndb$test                  |
| ndb$threadblocks          |
| ndb$threadstat            |
| ndb$transactions          |
| ndb$transporters          |
| nodes                     |
| resources                 |
| server_operations         |
| server_transactions       |
| threadblocks              |
| threadstat                |
| transporters              |
+---------------------------+
33 rows in set, 1 warning (0.00 sec)

mysql官方文档中的描述
If the mysqld process was not started with the --ndbcluster option, ndbinfo is not available and is not displayed by SHOW 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 than blocks

or config_params) fails with Got error 157 'Connection to NDB failed'  from NDBINFO.



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值