(3)[SQLD]
/usr/local/MySQL/bin/mysqld_safe --user=mysql &
如果出现ERROR 2002(HY000):Can't connect to local mysql server through socket............
可以再次创建系统数据库;
方法如下:
scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql
然后再次启动;
/usr/local/mysql/bin/mysqld_safe --user=mysql &
即可;
[root@sql1 ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.25a-ndb-7.2.7-gpl MySQL Cluster Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
管理节点查看:
ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.0.32 (mysql-5.5.25 ndb-7.2.7, Nodegroup: 0, Master)
id=3 @192.168.0.33 (mysql-5.5.25 ndb-7.2.7, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.0.31 (mysql-5.5.25 ndb-7.2.7)
[mysqld(API)] 2 node(s)
id=4 @192.168.0.30 (mysql-5.5.25 ndb-7.2.7)
id=5 @192.168.0.34 (mysql-5.5.25 ndb-7.2.7)
ndb_mgm>
4.测试
1.常规测试;
在节点4上,为了让在cluster中正常复制,创建一个表必须是ndbcluster引擎或者NDB引擎方法如下:
2.模拟NDB节点crash;
3.模拟SQL节点crash;
