码迷,mamicode.com
首页 > 数据库 > 详细

Mysql-cluster7.5

时间:2016-10-27 20:03:39      阅读:260      评论:0      收藏:0      [点我收藏+]

标签:server   ddr   node   can   location   engine   cts   var   shell   

Data nodes:

shell> rpm -Uhv mysql-cluster-community-data-node-7.5.5-1.1.el7.x86_64.rpm

SQL nodes:

shell> rpm -Uhv mysql-cluster-community-server-7.5.5-1.1.el7.x86_64.rpm
shell> rpm -Uhv mysql-cluster-community-client-7.5.5-1.1.el7.x86_64.rpm

Management nodes:

shell> rpm -Uhv mysql-cluster-commercial-management-server-7.5.5-1.1.el7.x86_64.rpm

 

Configuring the data nodes and SQL nodes:
shell> vi /etc/my.cnf
[mysqld]
ndbcluster # run NDB storage engine
[mysql_cluster]
ndb-connectstring=192.168.0.10 # location of management server

 

Configuring the management node:
shell> mkdir /var/lib/mysql-cluster
shell> cd /var/lib/mysql-cluster
shell> vi config.ini


[ndbd default]
NoOfReplicas=2 # Number of replicas
DataMemory=80M # How much memory to allocate for data storage
IndexMemory=18M # How much memory to allocate for index storage

[tcp default]
# TCP/IP options:
portnumber=2202 # This the default; however, you can use any

[ndb_mgmd]
hostname=192.168.0.10 # Hostname or IP address of MGM node
datadir=/var/lib/mysql-cluster # Directory for MGM node log files

[ndbd]
hostname=192.168.0.30 # Hostname or IP address
datadir=/usr/local/mysql/data # Directory for this data node‘s data files

[ndbd]
hostname=192.168.0.40 # Hostname or IP address
datadir=/usr/local/mysql/data # Directory for this data node‘s data files

[mysqld]
hostname=192.168.0.20 # Hostname or IP address

Cluster management nodes is 1186; the default port for data nodes is 2202.

 

On the management host:
shell> ndb_mgmd -f /var/lib/mysql-cluster/config.ini

On each of the data node hosts:
shell> ndbd

On each of the SQL node hosts:
shell> mysqld_safe &
shell> mysqld_safe --user=mysql &

Safe Shutdown and Restart of MySQL Cluster
shell> ndb_mgm -e shutdown

Mysql-cluster7.5

标签:server   ddr   node   can   location   engine   cts   var   shell   

原文地址:http://www.cnblogs.com/baxk/p/6004801.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!