1: Introduction to galera-cluster Galera Cluster is a free, open-source, high-availability solution developed by Codership. Its official website is http://galeracluster.com. Galera Cluster is a Mariadb cluster with Galera installed (this article only introduces the Mariadb Garela cluster). It has a multi-master feature and supports multi-point writing. The three (or more) nodes of Galera Cluster are in a peer relationship. Each node supports writing. The consistency and integrity of written data are guaranteed within the cluster. The specific implementation principle will be briefly introduced in this article. The official features are as follows:
2. How galera-cluster works
3: MariaDB's galera-cluster deployment3.1: Introduction to system software environment
3.2: Configure the time synchronization server
3.3 Install mariadb-galear-cluster All cluster nodes execute: yum remove -y mariadb-libs yum install -y unzip boost-devel lsof perl-DBI perl-Data-Dumper rpm -ivh rpm -ivh MariaDB-10.0.37-centos73-x86_64-* rpm -ivh MariaDB-Galera-10.0.37-centos73-x86_64-* 3.4 Node Configuration File Node 1: jiankong01.yl.com cd /etc/my.cnf.d vim server.conf ---- [mysqld] # # * Galera-related settings # [galera] # Mandatory settings wsrep_provider= /usr/lib64/galera/libgalera_smm.so wsrep_cluster_address="gcomm://192.168.20.33,192.168.20.34,192.168.20.35" wsrep_cluster_name = 'mycluster' wsrep_node_name = 'jiankong01.yl.com' wsrep_node-address = '192.168.20.33' binlog_format=row default_storage_engine=InnoDB innodb_autoinc_lock_mode=2 bind-address=0.0.0.0 # # Optional setting #wsrep_slave_threads=1 ---- Node 2: jiankong02.yl.com cd /etc/my.cnf.d/ vim server.conf ---- [mysqld] # # * Galera-related settings # [galera] # Mandatory settings wsrep_provider= /usr/lib64/galera/libgalera_smm.so wsrep_cluster_address="gcomm://192.168.20.33,192.168.20.34,192.168.20.35" wsrep_cluster_name = 'mycluster' wsrep_node_name = 'jiankong02.yl.com' wsrep_node-address = '192.168.20.34' binlog_format=row default_storage_engine=InnoDB innodb_autoinc_lock_mode=2 bind-address=0.0.0.0 # # Optional setting #wsrep_slave_threads=1 #innodb_flush_log_at_trx_commit=0 --- Node 3: jiankong03.yl.com cd /etc/my.cnf.d/ vim server.conf ---- [mysqld] # # * Galera-related settings # [galera] # Mandatory settings wsrep_provider= /usr/lib64/galera/libgalera_smm.so wsrep_cluster_address="gcomm://192.168.20.33,192.168.20.34,192.168.20.35" wsrep_cluster_name = 'mycluster' wsrep_node_name = 'jiankong03.yl.com' wsrep_node-address = '192.168.20.35' binlog_format=row default_storage_engine=InnoDB innodb_autoinc_lock_mode=2 bind-address=0.0.0.0 # # Optional setting #wsrep_slave_threads=1 #innodb_flush_log_at_trx_commit=0 ---- 3.4 Start the cluster Execute on any node in the cluster service mysql start --wsrep-new-cluster Here we take node 3 as an example: Node 1 and Node 2 execute: service mysql start 3.5: Create a database instance Node 1: mysql -uroot -pQingchun123.com create database nCalInfo Check on nodes 2 and 3 mysql -uroot -pQingchun123.com show databases The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: A brief analysis of the basic implementation of Vue detection data changes
>>: VMware virtual machine installation Linux system graphic tutorial
Apache Tika is a library for file type detection ...
1. Install mysql: udo apt-get install mysql-serve...
01. Command Overview Linux provides a rich help m...
mysql download, install and configure 5.7.20 / 5....
The operating environment of this tutorial: Windo...
Here is a case study on how to close ads using Ja...
1. Download the ElasticSearch 6.4.1 installation ...
If you are using Alibaba Cloud Server, you need t...
This article example shares the specific code of ...
Preface MySQL supports multi-threaded replication...
Basics In a relational database, each data table ...
Preface I recently used a virtual machine to inst...
1. Introduction Earlier we introduced the rapid d...
Before learning awk, we should have learned sed, ...
Idea imports an existing web project and publishe...