3.1首先需要为management node创建一个默认配置文件my.ini ,内容如下:
[mysql_cluster]
# Options for management node process
config-file=C:/mysql/bin/config/config.ini
3.2 创建整个cluster的配置文件config.ini
[ndbd default]
# Options affecting ndbd processes on all data nodes:
NoOfReplicas=2 # Number of replicas
DataDir=C:/mysql/bin/cluster-data # Directory for each data node's data files
# Forward slashes used in directory path,
# rather than backslashes. This is correct;
# see Important note in text
DataMemory=80M # Memory allocated to data storage
IndexMemory=18M # Memory allocated to index storage
# For DataMemory and IndexMemory, we have used the
# default values. Since the "world" database takes up
# only about 500KB, this should be more than enough for
# this example Cluster setup.
[ndb_mgmd]
# Management process options:
HostName=192.168.0.102 # Hostname or IP address of management node
DataDir=C:/mysql/bin/cluster-logs # Directory for management node log files
[ndbd]
# Options for data node "A":
# (one [ndbd] section per data node)
HostName=192.168.0.102 # Hostname or IP address
[ndbd]
# Options for data node "B":
HostName=192.168.0.104 # Hostname or IP address
[mysqld]
# SQL node A options:
HostName=192.168.0.102 # Hostname or IP address
[mysqld]
# SQL node B options:
HostName=192.168.0.104 # Hostname or IP address