首页 >数据库 >mysql教程 >MySQL的集群的安装与配置(6台机器)

MySQL的集群的安装与配置(6台机器)

WBOY
WBOY原创
2016-06-07 17:08:211245浏览

具体安装与配置:1)准备工作:6台机器,IP地址分别为192.168.0.(231-236)MGM节点:192.168.0.231(232) SQL 节点:192.168.0.

具体安装与配置:
1)
准备工作:
6台机器,,IP地址分别为
192.168.0.(231-236)
MGM节点:192.168.0.231(232)


SQL 节点:192.168.0.233-234


NDBD 节点:192.168.0.235-236

) 

4)配置NDBD节点:
[root@localhost mysql]# cat /etc/my.cnf 
[mysqld]
ndbcluster
#ndb-connectstring=192.168.0.231
#ndb-connectstring=192.168.0.232
这样写是可以连接成功。不过我今天来的时候发现全部DOWN掉了。
ndb-connectstring=192.168.0.231,192.168.0.232


[mysql_cluster]
#ndb-connectstring=192.168.0.231
#ndb-connectstring=192.168.0.232
ndb-connectstring=192.168.0.231,192.168.0.232
[root@localhost mysql]# 

5)配置SQL 节点:
[root@localhost mysql]# cat /etc/my.cnf 
[mysqld]
basedir=/usr/local/mysql/
datadir=/usr/local/mysql/data/
port=3306
user=nobody
socket=/tmp/mysql.sock

ndbcluster
#ndb-connectstring=192.168.0.231
#ndb-connectstring=192.168.0.232
ndb-connectstring=192.168.0.231,192.168.0.232


[ndbd]
connect-string=192.168.0.235
[ndbd]
connect-string=192.168.0.236

[ndbd_mgm]
connect-string=192.168.0.231
[ndbd_mgm]
connect-string=192.168.0.232
[ndbd_mgmd]
config-file=/etc/config.ini


[mysql_cluster]
#ndb-connectstring=192.168.0.231
#ndb-connectstring=192.168.0.232
ndb-connectstring=192.168.0.231,192.168.0.232
[root@localhost mysql]# 

MySQL的集群的安装与配置(6台机器)

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn