推薦閱讀: percona_migrator
安裝
brew install percona-toolkit
安裝完成後,使用下面命令,檢測是否安裝成功:
# pt-query-digest --help
# pt-table-checksum --help
運行後,若報錯
Cannot connect to MySQL because the Perl DBI module is not installed or not found
安裝 DBI 和 DBD::MySQL
$ sudo cpan
cpan> install DDI
cpan> install DBD::mysql
強烈推薦工具: 查找 cpan 的模塊路徑
出現 Segmentation fault:11 錯誤
# 卸載 percona-toolkit
brew uninstall percona-toolkit
# 卸載 vim
brew uninstall vim
# 卸載 perl
brew uninstall perl
# sudo rm -rf /usr/local/Cellar/perl/5.30.0
卸載後,再 brew install
重新安裝