title: mysql cluster in CentOS
body: <p>I am trying to configure a mysql cluster in CentOS but i had some issues I dont know how to solve and I would really appreciate some help.</p>
  
  <p>The mysql cluster environment:</p>
  
  <pre><code>DB1 - 192.168.50.101 - Management Server (MGM) node.
  DB2 - 192.168.50.102 - Storage Server (NDBD) node 1.
  DB3 - 192.168.50.103 - Storage Server (NDBD) node 2.
  </code></pre>
  
  <p>The steps I followed to configure the whole cluster:</p>
  
  <ol>
  <li>Configure the Management Server node (192.168.50.101)</li>
  </ol>
  
  <p>1.1 Install mysql server and start it:</p>
  
  <pre><code># yum install mysql mysql-server
  # chkconfig --levels 235 mysqld on
  # /etc/init.d/mysqld start
  </code></pre>
  
  <p>1.2 Install cluster packages:</p>
  
  <pre><code># rpm -ivh MySQL-ndb-management-5.0.90-1.glibc23.i386.rpm
  # rpm -ivh MySQL-ndb-tools-5.0.90-1.glibc23.i386.rpm
  </code></pre>
  
  <p>1.3 Create cluster directory and the config.ini file</p>
  
  <pre><code># mkdir /var/lib/mysql-cluster
  # cd /var/lib/mysql-cluster
  # vi config.ini
  </code></pre>
  
  <p>1.4 write the cluster config content in the config.ini</p>
  
  <pre><code>[NDBD DEFAULT]
  NoOfReplicas=2
  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.
  [MYSQLD DEFAULT]
  [NDB_MGMD DEFAULT]
  [TCP DEFAULT]
  
  # Management Section (MGM)
  [NDB_MGMD]
  #NodeId = 1
  # IP address of the management node
  HostName=192.168.50.101
  
  # Storage Server Section (NDBD)
  [NDBD]
  #NodeId = 2
  # IP address of the Storage Server (NDBD) node 1
  HostName=192.168.50.102
  DataDir=/var/lib/mysql
  BackupDataDir=/var/lib/backup
  DataMemory=100M
  
  [NDBD]
  #NodeId = 3
  # IP address of the Storage Server (NDBD) node 2
  HostName=192.168.50.103
  DataDir=/var/lib/mysql
  BackupDataDir=/var/lib/backup
  DataMemory=100M
  
  # one [MYSQLD] per storage node
  # 2 Clients MySQL
  [MYSQLD]
  #NodeId = 5
  [MYSQLD]
  #NodeId = 6
  </code></pre>
  
  <p>1.5 Start the Management Service</p>
  
  <pre><code># ndb_mgmd
  </code></pre>
  
  <p>1.6 Enter to the admin console</p>
  
  <pre><code># ndb_mgm
  </code></pre>
  
  <p>1.7 Use the command SHOW to check the nodes status</p>
  
  <pre><code>ndb_mgm&gt; show
  
  Connected to Managemente Server at: localhost:1186
  Cluster Configuration
  ---------------------
  [ndbd(NDB)] 2 nodes
  id=2 (not connected, accepting connect from 192.168.50.102)
  id=3 (not connected, accepting connect from 192.168.50.103)
  
  [ndb_mgmd(MGM)] 1 node
  id=1 @192.168.50.101 (Version: 5.0.95)
  
  [mysqld(API)] 2 nodes
  id=5 (not connected, accepting connect from any host)
  id=6 (not connected, accepting connect from any host)
  </code></pre>
  
  <ol>
  <li>The management node configuration is OK, so let's configure one Storage Server node (192.168.50.102).</li>
  </ol>
  
  <p>2.1 Install the mysql server, like the step 1.1 .</p>
  
  <p>2.2 Download the MYSQL Cluster from "<a href="http://dev.mysql.com/downloads/cluster/" rel="nofollow">http://dev.mysql.com/downloads/cluster/</a>"</p>
  
  <p>2.3 Extract the content and copy the files ndb to /usr/bin/.</p>
  
  <p>2.4 Connect the Storage Server node to the Management Server.</p>
  
  <pre><code>ndbd --connect-string=192.168.50.101 --initial -n
  </code></pre>
  
  <p>And here is the problem. In the Management Server, the next error is displayed:</p>
  
  <pre><code>ndb_mgm &gt; Node 2: Forced node shutdown completed. Ocurred during startphase 0. 
  Caused by error 2350: 'Invalid configuration received from Management 
  Server(Configuration error). Permanent error, external action needed'.
  </code></pre>
  
  <p>And in the Storage Server node, the displayed warning is:</p>
  
  <pre><code>[ndbd] INFO    -- Angel connected to '102.168.50.101:1186'
  [ndbd] INFO    -- Angel allocated nodeid: 2
  [ndbd] WARNING -- Configuration didn't contain generation (likely old ndb_mgmd
  </code></pre>
  
  <p>Does someone know what I should do to fix the problem?</p>
  
  <p>Thank you!</p>