window下mysql集群_Windows下搭建Mysql集群

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值