الخميس، 11 يوليو 2013

MySQL Cluster For Multiple Dedicated Servers

MySQL Cluster For Multiple Dedicated Servers 

The main aim to create clusters MySQL is to have redundancy - your hosting server and programs will run efficiently even if one hosting server goes down


Note: For better performance you should have a 3rd hosting server as a control node, but this can be closed down after the group begins. Also observe that closing down the control hosting server is not suggested (see the additional notices at the end of this paper for more information). You cannot run a MySQL Cluster with just two Hosting And have real redundancy.

It is possible to set up the group on two Devoted Web servers you will not get the capability to "kill" one hosting server and for the group to proceed at regular. For this you need a third hosting server operating the control node.

Now below I had given the example for three servers:

mysql1.domain.com - 192.168.0.1
mysql2.domain.com - 192.168.0.2
mysql3.domain.com - 192.168.0.3

Servers 1 and 2 will be the two that end up "clustered". This would be ideal for two servers behind a fill balancer or using circular robin the boy wonder DNS and is an excellent replace duplication. Server 3 needs to have only minimal changes created for it and does NOT need a MySQL set up. It can be a low-end device and can be undertaking other projects.

STAGE 1: Install MySQL on the first two servers:

Complete the following actions on both mysql1 and mysql2:

cd /usr/local/
dev.mysql.com/get/Downloads/MySQL-4.1/mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz/

from/signal42.com/mirrors/mysql/
Grouped mysql
Useradd -g mysql 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
Ln -s mysql-max-4.1.9-PC-Linux-gnu-i686 mysql
CD mysql
Scripts/mysql_install_db --user=mysql
Chown -R primary .
Chown -R mysql data
Chgrp -R mysql .
Cup support-files/mysql. server /etc/rc.d/Inuit. d/
Chmod +x /etc/rc.d/Inuit. d/mysql. server
Chkconfig --add mysql. server

Do not begin MySQL yet.

STAGE 2: Install and set up the control server

You need the following details files from the bin/ of the mysql directory: ndb_mgm and ndb_mgmd. Obtain the whole mysql-max table and draw them out from the bin/ listing.

Mkdir /usr/src/mysql-MGM
CD /usr/src/mysql-MGM
dev.mysql.com/get/Downloads/MySQL-4.1/mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz/

from/www.signal42.com/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
CD mysql-max-4.1.9-PC-Linux-gnu-i686
mv bin/ndb_mgm .
mv bin/ndb_mgmd .
chmod +x ndb_mg*
mv ndb_mg* /usr/bin/
CD
rm -rf /usr/src/mysql-mgm
 

 

ليست هناك تعليقات:

إرسال تعليق