简体   繁体   English

MariaDB的Maxscale(BinLog Server)可以用作来自不同mysql集群的binlog的收集器吗?

[英]Can MariaDB's Maxscale(BinLog Server) be used as a collector of binlogs from different mysql clusters?

I have read that Maxscale( BinLog Server ) of MariaDB can be used for relaying the bin logs from a MySQL Cluster to a single BinLog Server , however i wanted to know if its possible to collect all the bin logs from different MySQL Cluster and persist on a single BinLog Server and no mysql slaves would be reading from it. 我已经读过MariaDB的Maxscale( BinLog Server )可用于将MySQL群集中的bin日志中继到单个BinLog Server ,但是我想知道是否有可能从不同的MySQL Cluster收集所有bin日志并继续运行单个BinLog服务器,并且没有mysql从属服务器正在从中读取。 In case its possible how are the conflicts like same database name in different MySQL Cluster, etc are handled? 如果可能,如何处理不同的MySQL Cluster中的相同数据库名称之类的冲突?

The binlogrouter module in MaxScale is a replication proxy. MaxScale中的binlogrouter模块是复制代理。 It stores the binary logs of the master on the MaxScale server. 它将主数据库的二进制日志存储在MaxScale服务器上。 Unlike a normal replication slave, the binlogrouter will not write its own binary log. 与普通的复制从站不同,binlogrouter不会写自己的二进制日志。 This means that the binary logs on the MaxScale server will be identical to those on the original master server. 这意味着MaxScale服务器上的二进制日志将与原始主服务器上的二进制日志相同。

To collect binlogs from multiple clusters, you need to configure multiple binlogrouter services and point each one of them to a master server. 要从多个集群中收集binlog,您需要配置多个binlogrouter服务并将它们中的每一个指向一个主服务器。 The binary logs are stored separately for each configured service. 对于每个已配置的服务,二进制日志分别存储。

Here's an example configuration of a binlogrouter service and a listener: 这是binlogrouter服务和侦听器的示例配置:

[Replication-Router]
type=service
router=binlogrouter
version_string=10.0.17-log
router_options=server_id=4000,binlogdir=/var/lib/maxscale/,filestem=mysql-bin
user=maxuser
passwd=maxpwd

[Replication-Listener]
type=listener
service=Replication-Router
protocol=MySQLClient
port=3306

Read the Binlogrouter documentation for more information about the various options. 阅读Binlogrouter文档以获取有关各种选项的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM