Steps to Set Up MySQL Cluster For Multiple Dedicated Servers

Main aim to set up clustering MySQL is to have redundancy – you host and also applications can run easily if one server goes downhill.

Note: To superior performance that you ought to have a 3rd server as a management node however this can be shut down following the cluster begins. Also remember that shutting down the direction server is not advocated (see the added notes at the base of this record for more details ). You can’t run a MySQL Cluster with only two Dedicated servers And also possess true redundancy ip booter.

It’s likely to establish the cluster on two wheeled Servers you will not get the power to”destroy” a server and for the bunch to remain as normal. With this you require a third host conducting the direction node.

I had given the example for three servers: – – –

Servers 1 and two are both that find yourself”clustered”. This would be ideal for just two servers behind a load balancer or using round robin DNS and is a good replacement for replication. Server 3 needs to possess only minor alterations made to it does NOT call for a MySQL setup. Additionally, it is sometimes a non invasive system and could be taking out other activities.

STAGE 1 ): Set up MySQL on the two servers:

Complete the Subsequent steps on both mysql1 and also mysql2:

C d / / usr/local/

from/signal42. com/mirrors/mysql/

Chown -R mysql info
chgrp -R mysql.
cp support-files/mysql. Waiter /

/rc. d/init. d/init. d/mysql.

Do not commence MySQL but.

Phase 2: Install and configure the control server

You want the following files out of the bin/ of this mysql listing: ndb_mgm and also ndb_mgmd. Download the whole mysql-max tarball and extract them by the bin/ directory.

Mkdir / / usr/src/mysql-mgm
Cd / / usr/src/mysql-mgm

from/www. / mirrors/mysql/
Tar -zxvf mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz
rm mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz
C-D mysql-max-4.1.9-pc-linux-gnu-i686
mv bin/ndb_mgm.

You now Should Establish the config file for this control:

Mkdir /var/lib/mysql-cluster
Cd /var/lib/mysql-cluster
vi [or emacs or any other editor] config.ini

Now, insert the following (changing the bits as indicated):

Number Managment Server
HostName= # the IP of the SERVER
# Storage Engines
HostName= Number the IP of the FIRST SERVER
DataDir= /var/lib/mysql-cluster
HostName= Number the IP of the SECOND SERVER
No 2 MySQL Customers
# I personally leave this blank to Permit rapid changes of this mysql customers;
# you can input the hostnames of this above two servers here. I suggest you don t.

Now, Begin the management server


This may be actually the MySQL management host, perhaps not management console. You should hence not expect any outcome (we will begin the console after ).

Phase 3: Establish the storage/SQL servers and start MySQL

On Every One of the two storage/SQL servers ( along with input the following (altering the bits as appropriate):

Leave a Reply

Your email address will not be published. Required fields are marked *