WEB开发网
开发学院数据库MySQL MySQL群集双机模拟 阅读

MySQL群集双机模拟

 2007-02-13 10:53:43 来源:WEB开发网   
核心提示: shell>chkconfig –level 3 mysql.server offManagement Node Installation在主机ndb1_mgmd_sqld1上执行如下过程shell>cd /var/tmpshell>tar -zxvf mys

shell>chkconfig –level 3 mysql.server off

Management Node Installation

在主机ndb1_mgmd_sqld1上执行如下过程

shell>cd /var/tmp

shell>tar -zxvf mysql-max-4.1.12a-pc-linux-gnu-i686.tar.gz /usr/local/bin '*/bin/ndb_mgm*'

Configuration

Configuring the Storage and SQL Nodes

在两台主机上执行如下过程:

shell>vi /etc/my.cnf

[MYSQLD]             # Options for mysqld process:

ndbcluster           # run NDB engine

ndb-connectstring=192.168.1.100  # location of MGM node

[MYSQL_CLUSTER]         # Options for ndbd process:

ndb-connectstring=192.168.1.100  # location of MGM node

Configuring the Management Node

在主机ndb1_mgmd_sqld1上执行如下过程

shell>mkdir /var/lib/mysql-cluster

shell>cd /var/lib/mysql-cluster

shell>vi config.ini

[NDBD DEFAULT]   # Options affecting ndbd processes on all data nodes:

NoOfReplicas=2   # Number of replicas

DataMemory=80M   # How much memory to allocate for data storage

IndexMemory=52M  # How much memory to allocate for 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.

[TCP DEFAULT]

上一页  1 2 3 4 5  下一页

Tags:MySQL 群集 双机

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接