有没有简单的方法在带有 mamp 的 MAC OS 10.8 上安装 mytop?
Posted
技术标签:
【中文标题】有没有简单的方法在带有 mamp 的 MAC OS 10.8 上安装 mytop?【英文标题】:Is there easy way to install mytop on MAC OS 10.8 with mamp? 【发布时间】:2013-06-28 21:25:55 【问题描述】:有什么简单的方法可以在 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.
【问题讨论】:
【参考方案1】:你必须使用 CPAN 安装 perl 模块 DBD::mysql。
http://www.cpan.org/modules/INSTALL.html
【讨论】:
【参考方案2】:2021 年更新 要在您的 Mac 上安装和配置 Mytop,请按照以下步骤操作:
-
安装 Mytop 在终端上运行此命令:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
然后运行:
brew install mytop
-
创建一个mytop配置文件,该文件必须在你的mac用户的文件夹是:/Users/your_user/
nano ~/.mytop
-
粘贴并替换为您的凭据
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)
【讨论】:
以上是关于有没有简单的方法在带有 mamp 的 MAC OS 10.8 上安装 mytop?的主要内容,如果未能解决你的问题,请参考以下文章
Vhost 与 Mamp Mac OS High Sierra
在 Mac OS X Yosemite 10.10 上使用 Mamp Pro 进行 Mcrypt