blog.up-link.ro
17Oct/100

UNIX Tools: mytop – MySQL Monitoring Tool

MyTop is a console-based tool for monitoring the threads and overall performance of a MySQL server. It runs on most Unix systems. MyTop is a top clone for MySQL Server.

To install MyTop under FreeBSD, enter:

make install clean -C /usr/ports/databases/mytop

To install MyTop under CentOS, Fedora, RHEL, enter:

yum install mytop

To install MyTop under Debian, Ubuntu, enter:

sudo apt-get install mytop

MyTop Arguments

mytop handles long and short command-line arguments:

-u or -user username
Username to use when logging in to the MySQL server. Default: root.

-p or -pass or -password password
Password to use when logging in to the MySQL server. Default: none.

-h or -host hostname[:port]
Hostname of the MySQL server. The hostname may be followed by the port number. Note that the port is specified separate from the host when using a config file. Default: localhost.

-port or -P port
If you are running MySQL on a non-standard port, use this to specify the port number. Default: 3306.

-s or -delay seconds
How long between display refreshes. Default: 5

-d or -db or -database database
Use if youd like mytop to connect to a specific database by default. Default: test.

Check the manual for more arguments.

To run MyTop, enter:

mytop -u root -p pass -d blog

You can also create a .mytop file in your home directory:

user=root
pass=password
host=localhost
db=blog
delay=1
port=3306
socket=/var/lib/mysql/mysql.sock
batchmode=0
header=1
color=1
idle=1

Print This Post Print This Post
Comments (0) Trackbacks (1)

No comments yet.


Leave a comment


*