Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ MySQL Tutorial: Building MySQL Cluster under Linux     - Oracle Data Pump Example (Database)

- CentOS6.0 successful installation and configuration OpenCV (Linux)

- E: Sub-process / usr / bin / dpkg returned an error code (1) error solution (Linux)

- Docker installation under CentOS7 (Linux)

- Docker study notes (Server)

- Java interview questions in nine radio (Programming)

- The Linux C truncate function clears the file notes (Programming)

- CentOS 6.5 installation VNCServer implement graphical access (Server)

- RHEL7 Apache MPM configuration (Server)

- Check the Linux server performance with ten or so commands in a minute (Server)

- libnet list of functions (Programming)

- How x2g0 install Remote Desktop on Linux VPS (Server)

- Linux create and delete user step (Linux)

- CentOS install expect (Linux)

- Distributed Firewall Design on Linux platform (Linux)

- JDK tools jstat (Linux)

- C ++ 11 feature: decltype keywords (Programming)

- Install mono offline on CentOS (Server)

- Oracle 12C RAC on temporary table space Enlighten (Database)

- SSH without password Definitive Guide (Linux)

 
         
  MySQL Tutorial: Building MySQL Cluster under Linux
     
  Add Date : 2018-11-21      
         
         
         
  Install version mysql-cluster-gpl-7.4.6-linux-glibc2.5-i686.tar.gz
System for the Linux virtual machine

Virtual Machine 2 (assurance firewall turned off, or may be unsuccessful deployment)

ip: 192.168.52.130 as management, data node, the service node

ip: 192.168.52.131 as a data node, the service node

A: install cluster software

Each node requires the following steps (in fact, the management can not, but I do when they are together, so not too many studies):

1, download extract to / usr / local / mysql (you can choose your own directory)

tar -zxvf mysql-cluster-gpl-7.4.6-linux-glibc2.5-i686.tar.gz

mv mysql-cluster-gpl-7.4.6-linux-glibc2.5-i686 / usr / local / mysql /

2, create mysql user

useradd mysql

chown -R mysql: mysql / usr / local / mysql /

3, modify / etc / profile for ease of use

PATH = $ PATH: / usr / local / mysql / bin

export PATH

4. Installation mysq (step source installation of mysql)

cd / usr / local / mysql / scripts

./mysql_install_db --basedir = / usr / local / mysql / --datadir = / usr / local / mysql / data / --user = mysql

5, configuration management node ndb

Copy / usr / local / mysql / bin / ndb_mgm, ndb_mgmd two files to / usr / local / bin

cp / usr / local / mysql / bin / ndb_mgm * / usr / local / bin

All of this installation is finished, the following is to start

Boot sequence node for node management -> Data Node -> SQL node

Two: Start the management node

Create a profile on the management node config.ini as follows

mkdir / var / lib / mysql-cluster

vim /var/lib/mysql-cluster/config.ini

config.ini contents

[Ndbd default]
 NoOfReplicas = 2 # image quantity of each data node, if the node is 1 when the data is broken then the cluster is unavailable, "opposite 1
DataMemory = 200M # each data node in the memory allocated to the data
IndexMemory = 30M # each data node in the memory allocated to the index

[Ndb_mgmd]
 id = 1
 hostname = 192.168.52.130 # IP management node
 datadir = / var / lib / mysql-cluster / # management node directory

[Ndbd]
 id = 2
 hostname = 192.168.52.131 # IP node data
 datadir = / usr / local / mysql / data # data node directory
  
 [Ndbd]
 id = 3
 hostname = 192.168.52.130 # IP node data
 datadir = / usr / local / mysql / data # data node directory
 
 [Mysqld]
 id = 4
 hostname = 192.168.52.130 #sql node IP
  
 [Mysqld]
 id = 5
 hostname = 192.168.52.131 #sql node IP

(Note: NoOfReplicas data indicating the number of copies, if it is 1, there will be data nodes single point of failure)

Start Management Service on the management node

ndb_mgmd -f /var/lib/mysql-cluster/config.ini
If you can reload modified config.ini
ndb_mgmd -f /var/lib/mysql-cluster/config.ini --reload - add to reload

ndb_mgm -e show to check the cluster status
ndb_mgm -e shutdown shut down the cluster software

Management node started up.
Other machines connected to the management node test

First of all the other nodes in the management node is not known which ip (because no other nodes config.ini)

Three: Each node configuration file /etc/my.cnf

So you want to configure profiles and services on /etc/my.cnf,mysql start time will default load /etc/my.cnf

my.cnf as follows:

[Mysqld]
 ndbcluster
 datadir = / usr / local / mysql / data
 basedir = / usr / local / mysql
 socket = / tmp / mysql.sock
 port = 3306
 ndb-connectstring = 192.168.52.130 --- management node ip
 [Mysql_cluster]
 ndb-connectstring = 192.168.52.130 --- management node ip

Then on unmanaged node ndb_mgm -e show could see just the cluster status

2 Start the data node

/ Usr / local / mysql / bin / ndbd --initial

To add --initial parameters for the first time after the installation starts data nodes, and other times do not increase, unless it is in backup, restore or restart after configuration changes

ndb_mgm -e show cluster status

3 start service node

/ Usr / local / mysql / bin / mysqld_safe --user = mysql &

ndb_mgm -e show cluster status

To build on the success of this test, then adjourned.
     
         
         
         
  More:      
 
- RHEL 6.4 installed MySQL 5.6.27 (Database)
- Oracle database online redo logs are several methods of recovery of deleted (Database)
- 11 examples in Linux df command (Linux)
- Using Python multithreaded mistakes summary (Programming)
- Getting Started with Java NIO (Programming)
- C language sorting instance (select, bubble, insert, binary, fast) (Programming)
- Configuring xdebug debugging environment in Ubuntu 14.04 under the PhpStorm (Linux)
- Elaborate .NET Multithreading: Concepts (Programming)
- Linux modify the network interface name (Linux)
- Linux installation and configuration curl command tool (Linux)
- To install network scanning and packet sniffer tool Nmap 7.00 under ubuntu (Linux)
- How nodeclub constructed Docker image (Server)
- Hadoop namenode do NFS disaster recovery (Server)
- Linux System Tutorial: Ubuntu on the desktop is disabled by default keyring to unlock tips (Linux)
- RVM installation instructions (Linux)
- Use innobackupex full realization of MySQL hot backup (Database)
- Configuring VMWare FreeBSD9.2 remote debugging kernel source code (Linux)
- MongoDB 2.6 deployment replica set + partitions (Database)
- Java memory mechanism Description (Programming)
- How do you change the default browser and Email Client in Ubuntu (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.