MySQL群集双机模拟
2007-02-13 10:53:43 来源:WEB开发网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]
更多精彩
赞助商链接