1. Configure the environment. MGM: 192.168.0.31NDBD1: 192.168.0.32NDBD2: 192168.0.33SQL1: 192.168.0.34SQL2: 192.168.0.302. install the software (
1. Configure the environment. MGM: 192.168.0.31 NDBD1: 192.168.0.32 NDBD2: 192168.0.33 SQL1: 192.168.0.34 SQL2: 192.168.0.30 2. install the software (
1. Configure the environment;
MGM: 192.168.0.31
NDBD1: 192.168.0.32
NDBD2: 192168.0.33
SQL1: 192.168.0.34
SQL2: 192.168.0.30
2. Software Installation
(1) Management node MGM
First, create a configuration file for the management node at an appropriate location;
Config. ini
[Ndbd default]
NoOfReplicas = 2
DataMemory = 80 M
IndexMemory = 18 M
[Tcp default]
Portnumber = 2202
[Ndb_mgmd]
Hostname = 192.168.0.31
Datadir =/var/lib/mysql-cluster
[Ndbd]
Hostname = 192.168.0.32
Datadir =/usr/local/mysql/data
[Ndbd]
Hostname = 192.168.0.33
Datadir =/usr/local/mysql/data
[Mysqld]
Hostname = 192.168.0.30
[Mysqld]
Hostname = 192.168.0.34
A. Change the address to the/var/tmp directory, decompress the mysql-cluster compressed file, and retrieve ndb_mdmd and ndb_mdm;
B. Change the path to the copied directory and make sure the two files are executable;
Chmod + x ndb_mgm *
C. Create a mysql folder under/usr/local;
(2) Data nodes NDBD and SQL nodes;
Configure the data node NDBD and SQL node;
Perform the following configuration on each SQL node in the/etc/my. cnf file;
[Client]
Socket =/usr/local/mysql/sock/mysql. sock
[Mysqld]
Ndbcluster
Datadir =/usr/local/mysql
Socket =/usr/local/mysql/sock/mysql. sock
Ndb-connectstring = 192.168.0.31
# User = mysql
# Default to using old password format for compatibility with mysql 3.x
# Clients (those using the mysqlclient10 compatibility package ).
Old_passwords = 1
# Disabling symbolic-links is recommended to prevent assorted security risks;
# To do so, uncomment this line:
# Symbolic-links = 0
[Mysql_cluster]
Ndb-connectstring = 192.168.0.31