The following is a look at mariadb multi-source replication (mariadb Multi-master replication) example, I hope to help you.MARIADB multi-source Replication (mariadb Multi-master replication
MARIADB multi-source Replication (mariadb Multi-master replication)Multi-master replication is added to the mariadb-10.0.
Modified syntax:there is a corresponding connection_name for each rep
Knowledge background??I. MARIADB copy-related knowledge??Source of 1.mariadb???? MySQL database is currently in the database market share only second only to the Oracle database, but also the open source database leader. Because MySQL database is open-source and high-performance, but also free (but not optimistic after Oracle acquisition), so the father of MySQL has opened a new MySQL branch
MariaDB's GTID replication and multi-source replication, mariadbgtid Replication
What is GTID?
GTID is the global transaction ID (global transaction identifier). It was initially implemented by google and officially added to MySQL in MySQL 5.6. GTID is actually composed of UUID + TID. UUID is the unique identifier of a MySQL instance. TID indicates the number of
makes it very easy to track and compare replication things and to recover quickly from crashes. In particular, the INNODB engine must be implemented with the help of gtid in order to achieve high-availability functionality.Second, the application scenarioGtid is especially important when using mariadb for high availability, for example, in a high-availability environment, in a master multi-slave mode, when
Master and Slave server time to synchronize, the database version is best consistent, so as to avoid the function of processing, log read, log parsing and other anomalies.
The following three master-slave replication settings are independent.
Notice the impact of firewalls and selinux.
1, simple master-slave replication implementation
(1) configuration of the primary server
1) Installation
server and is composed of 128 random characters, the mysql-5.6 relies on the server-id and uuid to identify each host in the replication architecture, because 128-bit random strings are not repeated globally, server-id and uuid and the transaction serial number of every mysql transaction constitute a unique gtid, since the introduction of mysql-5.6, every binary log will write the gtid mark in the header of every transaction, therefore, gtid makes it
two replication schemes:
First, both statement-based replication and row-based replication are performed asynchronously by recording the binary logs of the master server and performing replay on the slave server.
Mariadb or mysql replication is mostly backward compatible. T
mariadb 10 Multi-source Replication (multi-source replication) Business usage scenario analysis, and how to use itOfficial MySQL a slave can only correspond to one MASTER,MARIADB 10 start supporting multi-source replication, and a slave can have multiple master, replicating
Label:What is Gtid? Gtid is the global transaction ID (transaction identifier), originally implemented by Google, and official MySQL joined the feature in 5.6. Gtid is actually made up of Uuid+tid. Where the UUID is the unique identity of a MySQL instance. The TID represents the number of transactions that have been committed on the instance and is monotonically incremented as the transaction commits. What is multi-source replication? Multi-source
Official Document: Https://mariadb.com/kb/en/mariadb/parallel-replicationStarting with version 10.0.5, MARIADB began to support parallel replicationMariaDB10.0 can perform queries and copy operations in parallel from the server, this article will explain how it is implemented and what you can do to tune it.Note: The version of MariaDB on the master-slave server m
Master-slave replication:From the server:I/O Thread: Requests binary log information from master and saves it to the relay log;SQL thread: Reads the log information from the relay log and completes the replay locally; Async mode: Async 1, from the server behind the main server, 2, the master-slave data inconsistency; binary log format: SET datetime = Now () 1, line 2 based, statement-based 3. Hybrid configuration process: 1, Master (1) Enable binary log; MY.CNF----> Log_bin=log_bin.log
MariaDB single-host dual-instance master-slave Replication
MariaDB single-host dual-instance master-slave Replication
MariaDB is actually the same as MySQL, but its name is different.
Start ~ In the previous experiment, we installed Mari
Tags: mysql mariadb master-slave replication multi-instance MySQL master-slave replicationMySQL Multi-instanceMySQL multi-instance, simple to understand is on a server, the MySQL service to open a number of different ports (such as 3306, 3307,3308), running multiple service processes. These MySQL service processes use different sockets to listen to different data ports, thus providing their own services ind
mariadb Introduction
MARIADB is a branch versionof MySQL, MARIADB's biggest feature is to replace MyISAM 's aria engine and multi-master replication capabilities, and so on. In this document, we mainly introduce multi-master replication.
Multi-master replication
MARIADB Multiple source replication data rollup, as shown in the following figure, in some scenarios, there are A and b two node databases, from the data to read AB Two nodes data to a Slave database
Main A and main B:
[Root@master local]# Tar XF mariadb-10.0.10-linux-x86_64.tar.gz[Root@master local]# ln-sv mariadb
configuration is complete systemctl start mariadb Access to the database, authorized backup account only allows encrypted backups to view current binary log information mysql
MariaDB [(none)]> grant replication slave on *.* to [emailprotected]‘192.168.99.150‘ identified by ‘slave‘ require ssl;
MariaDB [(none)]>sho
This is a process of creating duplicate database versions. The replication process not only copies a database, but also synchronizes changes from the master node to a slave node. But this does not mean
This is a process of creating duplicate database versions. The replication process not only copies a database, but also synchronizes changes from the master node to a slave node. But this does not mean
T
Tip
For the principle and implementation of master-slave replication, see MySQL master-slave replication.
I. Questions about Replication
1. asynchronous replication solves those problems
The basic problem solved by replication is that data on one server is synchronized with
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.