Home > Database > Mysql Tutorial > MySQL的集群的安装与配置(6台机器)

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

WBOY
Release: 2016-06-07 17:08:21
Original
1255 people have browsed it

具体安装与配置: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]# 

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template