发布于 2014-10-28 00:59:27 | 175 次阅读 | 评论: 0 | 来源: 网友投递
Orchestrator MySQL 复制拓扑可视化工具
Orchestrator 是 MySQL 复制拓扑管理和可视化工具
Orchestrator 1.2.1 BETA 发布,此版本现已提供下载,支持 Pseudo GTID,提供一个强大的,重构过的复制拓扑,包括失败实例。
Orchestrator 是 MySQL 复制拓扑管理和可视化工具
描述:即使本地 master 不能访问,还是可以移动拓扑
Inject a periodic unique entry onto your binary logs
Configure orchestrator to recognize said entry.
We will use the event scheduler (must be enabled) to inject an entry every 10 seconds, recognized both in statement-based and row-based replication.
create database if not exists meta; drop event if exists meta.create_pseudo_gtid_view_event; delimiter ;; create event if not exists meta.create_pseudo_gtid_view_event on schedule every 10 second starts current_timestamp on completion preserve enable do begin set @pseudo_gtid := uuid(); set @_create_statement := concat('create or replace view meta.pseudo_gtid_view as select '', @pseudo_gtid, '' as pseudo_gtid_unique_val from dual'); PREPARE st FROM @_create_statement; EXECUTE st; DEALLOCATE PREPARE st; end ;; delimiter ; set global event_scheduler := 1;
确保启用 my.cnf 配置文件的 event_scheduler 。
二进制日志里面条目类似于:
mysql [localhost] {msandbox} (meta) > show binlog events in 'mysql-bin.000002' LIMIT 2,1; +------------------+-----+------------+-----------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Log_name | Pos | Event_type | Server_id | End_log_pos | Info | +------------------+-----+------------+-----------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | mysql-bin.000002 | 388 | Query | 1 | 669 | use `meta`; CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=`msandbox`@`localhost` SQL SECURITY DEFINER VIEW `pseudo_gtid_view` AS select '2f6ad653-5db3-11e4-b91d-3c970ea31ea8' as pseudo_gtid_unique_val from dual | +------------------+-----+------------+-----------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
以上这些比较特别,日志配置如下:
{ ... "PseudoGTIDPattern": "CREATE OR REPLACE .*? VIEW `pseudo_gtid_view` AS select" }
"PseudoGTIDPattern" 值是个正则表达式,必须匹配 二进制日志中的 Pseudo GTID 条目。
更多内容请看发行说明。
Orchestrator 是 MySQL 复制拓扑管理和可视化工具,支持:
检测和审查复制集群
安全拓扑重构:转移服务于另外一台计算机的系统拓扑S
整洁的拓扑可视化
复制问题可视化
通过简单的拖拽修改拓扑
维护模式声明和执行
审计操作
重构拓扑只需要简单的拖拽。Orchestrator 会保证安全,并且禁止非法复制拓扑。