1、[mysqld(API)] 2 node(s)
id=4 (not connected, accepting connect from any host)
id=5 (not connected, accepting connect from any host)
2、
[root@localhost ~]# /usr/local/mysql/bin/mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.24-max
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use test
Database changed
mysql> show tables;
Empty set, 1 warning (0.00 sec)
mysql> create table t11 (id int) engine=ndb;
ERROR 1050 (42S01): Table 't11' already exists
解决办法:运行setup或者ntsysv命令进入系统启动设置。去掉iptables.关掉防火墙。不过保持sellinux是打开的。
早上还碰到一个错误:
[root@localhost data]# vi ndb_pid6423_error.log
Current byte-offset of file-pointer is: 568
Time: Friday 30 November 2007 - 23:15:28
Status: Permanent error, external action neededMessage: Invalid configuration received from Management Server (Configuration error)Error: 2350Error data: Could not connect to ndb_mgmdError object:Program: /usr/local/mysql/bin/ndbd
Pid: 6423
Trace:
Version: Version 5.1.21 (beta)
***EOM***
~由于我没有把ndb-connectstring=db1,db2,..dbn这样的规律写导致,已经解决。
PS:集群的数据节点是非常重要的,如果不能保证一个数据节点正常运行的话,集群也就失去了意义。管理节点在启动了集群后也就没有了意义。所以我在想多个管理节点是否有必要。