手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

MySQL中双NDBD节点Cluster快速配置

[日期:2013-03-21] 来源:Linux社区  作者:songxixi [字体:大 中 小]

(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;

linux
相关资讯       Cluster  MySQL Cluster配置 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款