Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ MariaDB 10 Multi-source replication     - Awk include binding capacity larger than the specified size of all files directory (Linux)

- Compiling source code Nginx module installation subs_filter (Server)

- Java by Spy Memcached to cache data (Programming)

- DNF Command Tutorial (Linux)

- Learning the Linux powerful network management capabilities (Linux)

- Linux LVM - File system extension (Linux)

- Linux commands with browsing and downloading files (Linux)

- Help you enhance Python programming languages 27 (Programming)

- Simple and fast sorting (Programming)

- Set up MySQL master and slave servers under Ubuntu 14.04 (Server)

- Hadoop upload files error solved (Server)

- ctop: monitor container performance Linux command line artifact (Linux)

- Golang environment configuration recommendations (Linux)

- Ubuntu 15.04 installed JDK and configured as the default JDK (Linux)

- Linux screen commonly commands (Linux)

- SSH without password Definitive Guide (Linux)

- Upgrading Oracle 11.2.0.1 to 11.2.0.3 (Database)

- Use install_updates upgrade GAMIT / GLOBK (Linux)

- Gitolite how to import other Git repositories (Server)

- Linux Operating System Security Management describes the top ten tricks (Linux)

 
         
  MariaDB 10 Multi-source replication
     
  Add Date : 2018-11-21      
         
         
         
  Official mysql a slave corresponds to only one master, mariadb 10 began to support multi-source copy, a slave can have multiple master, the master copy from their respective different DB.

This feature can be used in OLAP environment, the traditional electricity supplier DB are demolished and then split, sub-library sub-table, sharding, and OLAP environment or big data platform environment, usually requires a variety of aggregate data, a plurality of multiple platforms DB complex data queries, and these data are scattered throughout the library, how to do, of course, the polymerization can be achieved through the application, but there is no easier way, such as direct library on each server, associate the table field. Mysql Oracle's DBLINk no function, and although there are mysql federated engine, but less reliable, and trouble, how kind of unpredictable performance.

This time, the advantages of multi-source mariadb copy function is manifested. Multiple server directly to the db, with a copy to the slave, all libraries have, like how related to how the association.

Other usage scenarios:

Two separate systems, through the interface, such as restful api or soap, an interface data transfer, data is often inconsistent on both sides of the communication scene, how to verify the data. In addition to the interface to check the log, you can use the multi-source copy, write directly to sql data communications link the two libraries, in the end is passing data sender or recipient receives the data in question, it is obvious.
DBA can check the number on the same DB SERVER, not to check the number of each server separately.
Backup convenient, concentrated on this multi-source replication slave for backup, not to the individual server up copy.
Pumping large number of data, the number of pumping concentrated on a DB platform, not dispersed to each DB server pumping number, of course, draw a few more, IO could not carry on ssd pcie card or bar.

Traditional multi-source copy copy mode change:

stop slave, show slave status to view the stop position
reset slave all;
change master 'conn_mall' to master_host = 'master ip',
MASTER_PORT = 3306, master_user = '', master_password = '',
master_log_file = 'mysql-bin.000036', master_log_pos = 189492612;
start slave 'conn_mall';
show all slaves status \ G or show slave 'conn_mall' status \ G
Add a new replication source:

The source export mysqldump --master-data = 2
slave end into
change master 'conn_erp' to master_host = 'master ip',
MASTER_PORT = 3306, master_user = '', master_password = '',
master_log_file = 'mysql-bin.000470', master_log_pos = 215418341;
start slave 'conn_erp';
Traditional copy mode - "multi-source copy command changes

reset slave -> reset slave 'conn_erp', a plurality of connecting the source name
start slave -> start slave 'connection_name' or start all slaves
show slave status -> show slave 'conn_mall' status, or show all slaves status See all connected slave state
sql_slave_skip_couter -> stop slave 'connection_name', to specify a connection source name set @@ default_master_connection = 'connection_name'; then set global sql_slave_skip_counter = 1; and finally start slave 'connection_name'
replicate -... variables variable problem of multi-source replication environment

You may be added before my.cnf replicate_ignore_db conn connection string prefix, such as main_connection.replicate_ignore_db = ignore_database
Without prefix, it is to ignore all the database of the same name, and other variables and so on.
     
         
         
         
  More:      
 
- Oracle Linux 7.1 install Oracle 12C RAC (Database)
- How to configure a development environment elegant Lua (Linux)
- Linux basic introductory tutorial ---- regex basis (Linux)
- Linux kernel TCP / IP parameters analysis and tuning (Linux)
- CentOS 7 install Hadoop-cdh-2.5 on Mesos (Server)
- Swift 2.0 brief (Linux)
- Setting Derby as Linux / Windows running as a service from the start (Server)
- To create someone else can not afford to delete the administrator user (Linux)
- ORA-38856: Unable instance UNNAMED_INSTANCE_2 (redo thread 2) marked enabled (Database)
- Spring + MyBatis Multi data source switching (Database)
- Python regular expressions: how to use regular expressions (Programming)
- Ubuntu Gitolite management Git Server code base permissions (Server)
- Redis performance test (Database)
- Read the official GNU Make manual one (chapter 1-2) (Programming)
- To establish a secure and reliable Linux operating system (Linux)
- Java Concurrency - processes and threads (Programming)
- Math objects easily overlooked but very convenient method --JavaScript (Programming)
- Java Network Programming Internet address lookup (Programming)
- AWR Report (Database)
- RealVNC Server 5.2.3 Installation and Configuration In Fedora (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.