MySQL Forums
Forum List  »  NDB clusters

case three
Posted by: gdy1039
Date: July 22, 2006 07:23PM

Now I use three machine to do this.
Pc01:mgm eth0 192.168.3.1/24
Pc02:ndb+mysql eth0 192.168.3.2
Pc03:ndb + mysql eth0 192.168.3.

#############my.cnf############
# Options for mysqld process:
[MYSQLD]
ndbcluster # run NDB engine
ndb-connectstring=192.168.3.1 # location of MGM node

# Options for ndbd process:
[MYSQL_CLUSTER]
ndb-connectstring=192.168.3.1 # location of MGM node
############config.ini#######################
# Options affecting ndbd processes on all data nodes:
[NDBD DEFAULT]
NoOfReplicas=2 # 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=192.168.3.1 # Hostname or IP address of MGM node
datadir=/var/lib/mysql-cluster # Directory for MGM node logfiles

# Options for data node "A":
[NDBD]
# (one [NDBD] section per data node)
hostname=192.168.3.1 # Hostname or IP address
datadir=/usr/local/mysql/data # Directory for this data node's datafiles

# Options for data node "B":
[NDBD]
hostname=192.168.3.2 # Hostname or IP address
datadir=/usr/local/mysql/data # Directory for this data node's datafiles

# SQL node options:
[MYSQLD]
hostname=192.168.3.1 # Hostname or IP address
# (additional mysqld connections can be
# specified for this node for various
# purposes such as running ndb_restore)
[MYSQLD]
Hostname=192.168.3.2

***********************************************************************

cluster startup first time,everythink is ok.
but,if I run this command at pc01 (at this time,mgm and pc02 is working)

--------------------------------------------------------------------------
Chkconfg –-level 12345 mysql.server off
add two line below in /etc/rc.d/rc.local
nohup /usr/local/mysql/bin/ndbd &
nohup /etc/init.d/mysql.server start &

and then shutdown –r now
------------------------------------------------------------------------
when reboot finish,ndb_mgm -e show
ndb connect ok
but mysql disconnect

in /var/lib/mysql-cluster/ndb_1_cluster.log show message below
***************************************************************
Could no alloc node id……………
***************************************************************
I try to change connectstring in my.cnf
Ndb1-> ndb-connectstring=nodeid=2,192.168.3.1
Ndb2-> ndb-connectstring=nodeid=3,192.168.3.1
Mysql1-> ndb-connectstring=nodeid=4,192.168.3.1
Mysql2-> ndb-connectstring=nodeid=5,192.168.3.1

Still not work!!!!
Oh My God!!!!
Help Me!!!!!!!!
qq:23281396
email:gdy1039@21cn.com
phone:13424687135

Options: ReplyQuote


Subject
Views
Written By
Posted
4678
July 22, 2006 07:09PM
1886
July 22, 2006 07:13PM
case three
1770
July 22, 2006 07:23PM
1455
July 24, 2006 09:28PM
1573
July 30, 2006 12:41AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.