0

我已经读过 MariaDB 的 Maxscale( BinLog Server ) 可用于将 bin 日志从 MySQL 集群中继到单个BinLog 服务器,但是我想知道是否可以从不同的 MySQL 集群收集所有 bin 日志并持续存在一个BinLog 服务器,没有 mysql 从属服务器会从中读取。万一它可能如何处理不同MySQL集群中相同数据库名称等冲突?

4

1 回答 1

0

MaxScale 中的binlogrouter模块是一个复制代理。它将主服务器的二进制日志存储在 MaxScale 服务器上。与普通的复制从站不同,binlogrouter 不会写入自己的二进制日志。这意味着 MaxScale 服务器上的二进制日志将与原始主服务器上的二进制日志相同。

要从多个集群收集 binlog,需要配置多个 binlogrouter 服务,并将每个服务指向一个主服务器。二进制日志为每个配置的服务单独存储。

这是 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

阅读Binlogrouter 文档以获取有关各种选项的更多信息。

于 2017-03-17T14:42:44.560 回答