Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ MySQL Tutorial: Building MySQL Cluster under Linux     - Java thread pool: ExecutorService, Executors (Programming)

- Getting Started with Linux system to learn: how to check memory usage of Linux (Linux)

- The security administrator network analysis tools SATAN Introduction under Linux (Linux)

- To install the latest version of the EPEL on CentOS 5.x or 6.x (Linux)

- Json data with double backslashes to a single backslash Json data processing (Programming)

- Hadoop upload files error solved (Server)

- Python function arguments * args and ** kwargs usage (Programming)

- The method of Linux into the rescue mode (Linux)

- Redis configuration file interpretation (Database)

- error 1819 (HY000): your password does not satisfy the current policy requirements (Database)

- Ceph performance optimization summary (v0.94) (Server)

- iOS in the event delivery and the responder chain (Programming)

- GRUB and Linux system repair (Linux)

- RCU lock in the evolution of the Linux kernel (Linux)

- MySQL import large amounts of data (Database)

- Oracle Client Dedicated and Shared connection mode (Database)

- Ubuntu Linux use ufw or iptables firewall configuration (Linux)

- Linux (CentOS) SSH login without password authentication (Linux)

- Linux Workstation Security Checklist - from the Linux Foundation Internal (Linux)

- Linux md5sum verify file integrity (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:      
 
- Openfire achieve load balancing cluster by Nginx (Server)
- Linux terminal program running in the background (Linux)
- xCAT install and update software (Linux)
- C ++ in the elimination Wunused (Programming)
- C ++ function object (Programming)
- File encryption and decryption of Linux security mechanisms (Linux)
- MySQL high availability cluster fragmentation of deployment uses Fabric (Database)
- The lambda expression Java8 (constructor references) (Programming)
- How to find the available network adapter on Ubuntu (Linux)
- Linux script commands - terminal recorder (Linux)
- HTML5 postMessage cross-domain data exchange (Programming)
- Build Golang development environment configuration on Ubuntu 14.04 (Linux)
- Gentoo: startx problem appears Failed to load module (Linux)
- Use MongoDB C # MongoDB official driving operation (Database)
- MySQL binlog automatic cleanup script (Database)
- C ++ class implementation date operator overloading (Programming)
- Ubuntu How to install screen recording tool Simple Screen Recorder 0.3.1 (Linux)
- Ubuntu under VirtualBox virtual machine serial port settings (Linux)
- GAMIT learning materials finishing (Linux)
- Compare Oracle MySQL (ICP) index condition pushdown is described (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.