有没有简单的方法在MAC OS 10.8上使用mamp安装mytop?

时间:2013-07-01 17:04:16

标签: mysql homebrew osx-mountain-lion

有没有简单的方法在MAC OS 10.8上安装mytop。我尝试使用brew但显示错误。

Unsatisfied dependency: DBD::mysql
Homebrew does not provide Perl dependencies; install with:
  cpan -i DBD::mysql
Error: An unsatisfied requirement failed this build.

2 个答案:

答案 0 :(得分:0)

您必须使用CPAN安装perl模块DBD :: mysql。

http://www.cpan.org/modules/INSTALL.html

答案 1 :(得分:0)

2021 年更新
要在您的 Mac 上安装和配置 Mytop,请按照以下步骤操作:

  1. 在终端上运行此命令安装 Mytop:
  • 第一次运行:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
  • 然后运行:
brew install mytop
  1. 创建一个mytop配置文件,该文件必须在你mac用户所在的文件夹中:/Users/your_user/
nano ~/.mytop
  1. 粘贴并替换为您的凭据
user=your_database_user
pass=your_database_password
host=localhost
db=your_database
delay=5
port=3306
socket=/Applications/MAMP/tmp/mysql/mysql.sock
batchmode=0
header=1
color=1
idle=1

最后保存并运行:

mytop

如何使用

Help for mytop version 1.91   


  ? - display this screen
  # - toggle short/long numbers (not yet implemented)
  c - command summary view (based on Com_* counters)
  C - turn color on and off
  d - show only a specific database
  e - explain the query that a thread is running
  E - display current replication error
  f - show full query info for a given thread
  F - unfilter the display
  h - show only a specifc host's connections
  H - toggle the mytop header
  i - toggle the display of idle (sleeping) threads
  I - show innodb status
  k - kill a thread
  p - pause the display
  l - change long running queries hightlighing
  m - switch [mode] to qps (queries/sec) scrolling view
  o - reverse the sort order (toggle)
  q - quit
  r - reset the status counters (via FLUSH STATUS on your server)
  R - change reverse IP lookup
  s - change the delay between screen updates
  S - change slow query hightlighting
  t - switch to thread view (default)
  u - show only a specific user
  : - enter a command (not yet implemented)
  ! - Skip an error that has stopped replications (at your own risk)