日期:2014-05-16 浏览次数:20874 次
tar -zxvf apache-tomcat-5.5.25.tar.gz
# Options affecting ndbd processes on all data nodes:
[NDBD DEFAULT]
NoOfReplicas=1 # Number of replicas
DataMemory=80M # How much memory to allocate for data storage
IndexMemory=18M # 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/IP options:
[TCP DEFAULT]
#portnumber=2202 # This the default; however, you can use any
# port that is free for all the hosts in cluster
# Note: It is recommended beginning with MySQL 5.0 that
# you do not specify the portnumber at all and simply allow
# the default value to be used instead
# Management process options:
[NDB_MGMD]
hostname=127.0.0.1 # Hostname or IP address of MGM node ,mgmd's hostname
datadir=/home/mahaibo/mysql-5.0.45-linux-i686/mgmddata # Directory for MGM node logfiles
PortNumber=2203 #default value: 1186
# Options for data node "A":
[NDBD]
# (one [NDBD] section per data node)
hostname=127.0.0.1 # Hostname or IP address ,allow to access
datadir=/home/mahaibo/mysql-5.0.45-linux-i686/mgmddata # Directory for this data node's datafiles
# Options for data node "B":
[NDBD]
hostname=127.0.0.1 # Hostname or IP address
datadir=/home/mahaibo/mysql-5.0.45-linux-i686/mgmddata # Directory for this data node's datafiles
[MYSQLD]
hostname=127.0.0.1 # Hostname or IP address
# (additional mysqld connections can be
# specified for this node for various
# purposes such as running ndb_restore)
bin/ndb_mgmd -f mgmd.cnf
bin/ndb_mgm 127.0.0.1 2203 //因为mgmd服务用的端口是2203,所以要通过该端口链接
[mahaibo@client mysql-5.0.45-linux-i686]$ bin/ndb_mgm 127.0.0.1 2203 -- NDB Cluster -- Management Client -- ndb_mgm> show Connected to Management Server at: 127.0.0.1:2203 Cluster Configuration --------------------- [ndbd(NDB)] 2 node(s) id=2 (not connected, accepting connect from 127.0.0.1) id=3 (not connected, accepting connect from 127.0.0.1) [ndb_mgmd(MGM)] 1 node(s) id=1 @127.0.0.1 (Version: 5.0.45) [mysqld(API)] 1 node(s) id=4 (not connected, accepting connect from 127.0.0.1) ndb_mgm>