设为首页收藏本站

LinuxTone | 运维专家网论坛 - 最棒的Linux运维与开源架构技术交流社区!

 找回密码
 注册

用新浪微博连接

一步搞定

QQ登录

只需一步,快速开始

查看: 2281|回复: 0

[MySQL管理] 一个不错的MySQL集群管理工具 [复制链接]

LT管理团队

社区首席勤杂工

Rank: 9Rank: 9Rank: 9

签到
81
注册时间
2008-5-19
最后登录
2012-5-3
在线时间
1762 小时
阅读权限
200
积分
14979
帖子
2524
主题
1200
精华
25
UID
1

LT总司令

发表于 2009-1-20 09:26:13 |显示全部楼层
官方网站:http://www.maatkit.org/
安装很简单,比如我下载的maatkit-2725.zip ,释放后整个文件夹传到服务器上,对于软件环境要求,一般就是DBD::mysql和DBI,当然少不了perl.安装只要几个命令:
# cd maatkit-2725/
# perl Makefile.PL
# make
# make install

就可以使用了,下面是一些有用的功能
1、mk-table-checksum 检查主从表是否一致及有效的工具
2、mk-table-sync 使表一致的工具,不必重载从表而能够保证一致
3、mk-visual-explain exlpain解释工具
4、mk-heartbeat 主从同步的监视工具,能够给出从落后于主多少
5、mk-parallel-dump 多线程的mysqldump工具
6、mk-parallel-restore 多线程的表修复工具
7、mk-query-profiler 查询检测分析工具
8、mk-deadlock-logger 死锁的记录工具
9、mk-duplicate-key-checker key侦测工具
10、mk-show-grants 权限管理显示工具
11、mk-slave-restart slave的检测和重启工具
12、mk-slave-delay slave delay replication 的工具
mk-archiver Archive rows from a MySQL table into another table or a file.
mk-audit Analyze, summarize and report on MySQL config, schema and operation
mk-checksum-filter Filter checksums from mk-table-checksum.
mk-deadlock-logger Extract and log MySQL deadlock information.
mk-duplicate-key-checker Find possible duplicate indexes and foreign keys on MySQL tables.
mk-fifo-split Split files and pipe lines to a fifo without really splitting.
mk-find Find MySQL tables and execute actions, like GNU find.
mk-heartbeat Monitor MySQL replication delay.
mk-log-parser Analyze and review MySQL logs.
mk-log-player Split and play MySQL slow logs.
mk-log-server Serve MySQL binary logs.
mk-parallel-dump Dump sets of MySQL tables in parallel.
mk-parallel-restore Load files into MySQL in parallel.
mk-profile-compact Compact the output from mk-query-profiler.
mk-query-profiler Execute SQL statements and print statistics, or measure activity caused by other processes.
mk-show-grants Canonicalize and print MySQL grants so you can effectively replicate, compare and version-control them.
mk-slave-delay Make a MySQL slave server lag behind its master.
mk-slave-find Find MySQL replication slaves and execute commands on them.
mk-slave-move Move a MySQL slave around in the replication hierarchy.
mk-slave-prefetch Pipeline relay logs on a MySQL slave to pre-warm caches.
mk-slave-restart Watch and restart MySQL replication after errors.
mk-table-checksum Perform an online replication consistency check, or checksum MySQL tables efficiently on one or many servers.
mk-table-sync Synchronize MySQL tables efficiently.
mk-visual-explain Format EXPLAIN output as a tree.

-r-xr-xr-x 1 root root 76K Jan 19 16:19 mk-slave-prefetch
-r-xr-xr-x 1 root root 56K Jan 19 16:19 mk-slave-move
-r-xr-xr-x 1 root root 64K Jan 19 16:19 mk-query-profiler
-r-xr-xr-x 1 root root 26K Jan 19 16:19 mk-profile-compact
-r-xr-xr-x 1 root root 119K Jan 19 16:19 mk-log-parser
-r-xr-xr-x 1 root root 67K Jan 19 16:19 mk-heartbeat
-r-xr-xr-x 1 root root 59K Jan 19 16:19 mk-find
-r-xr-xr-x 1 root root 187K Jan 19 16:19 mk-table-sync
-r-xr-xr-x 1 root root 180K Jan 19 16:19 mk-table-checksum
-r-xr-xr-x 1 root root 53K Jan 19 16:19 mk-slave-find
-r-xr-xr-x 1 root root 45K Jan 19 16:19 mk-slave-delay
-r-xr-xr-x 1 root root 38K Jan 19 16:19 mk-show-grants
-r-xr-xr-x 1 root root 64K Jan 19 16:19 mk-parallel-restore
-r-xr-xr-x 1 root root 118K Jan 19 16:19 mk-parallel-dump
-r-xr-xr-x 1 root root 50K Jan 19 16:19 mk-deadlock-logger
-r-xr-xr-x 1 root root 101K Jan 19 16:19 mk-audit
-r-xr-xr-x 1 root root 116K Jan 19 16:19 mk-archiver
-r-xr-xr-x 1 root root 71K Jan 19 16:19 mk-visual-explain
-r-xr-xr-x 1 root root 75K Jan 19 16:19 mk-slave-restart
-r-xr-xr-x 1 root root 69K Jan 19 16:19 mk-duplicate-key-checker
-r-xr-xr-x 1 root root 26K Jan 19 16:19 mk-checksum-filter

示例:
[root@ldap-b ~]# mk-table-checksum -g mysql,information-schame--count -d test u=root,h=127.0.0.1,P=3333 u=root,h=127.0.0.1,P=4444
DATABASE TABLE      CHUNK HOST       ENGINE       COUNT          CHECKSUM TIME WAIT STAT  LAG
test      my_cms_00      0 127.0.0.1 MyISAM           7          a5a17d45     0     0 NULL NULL
test      my_cms_00      0 127.0.0.1 MyISAM           7          a5a17d45     0     0 NULL NULL
test      my_cms_01      0 127.0.0.1 MyISAM          11          919e0949     0     0 NULL NULL
test      my_cms_01      0 127.0.0.1 MyISAM          11          919e0949     0     0 NULL NULL
test      my_cms_02      0 127.0.0.1 MyISAM           0              NULL     0     0 NULL NULL
test      my_cms_02      0 127.0.0.1 MyISAM           0              NULL     0     0 NULL NULL
test      xx             0 127.0.0.1 MyISAM           0              NULL     0     0 NULL NULL
test      xx             0 127.0.0.1 MyISAM           0              NULL     0     0 NULL NULL
test      yy             0 127.0.0.1 InnoDB         102          aeb84950     0     0 NULL NULL
test      yy             0 127.0.0.1 InnoDB         102          aeb84950     0     0 NULL NULL
感谢大家对linuxtone的支持!
您需要登录后才可以回帖 登录 | 注册

IT运维专家网感谢红之盟网络提供带宽支持

合作联系: QQ:67888954/MSN:cnseek@msn.com/mail:netseek@linuxtone.org

Archiver|手机版|感谢所有关心和支持过LinuxTone的朋友们 转载本站内容请注明原作者名及出处 ( 京ICP备08103151 )   |

GMT+8, 2012-5-22 21:11 , Processed in 0.149405 second(s), 12 queries , Memcache On.

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部