MySQL: Find Out Which Table is Consuming Resources

Q. How do I find out which table is consuming resources under MySQL Database server from UNIX shell prompt?

A. You can use mytop command a console-based (non-gui) tool for monitoring the threads and overall performance of a MySQL.

Install mytop

First install required perl modules:
cpan -i Term::ReadKey
cpan -i Term::ANSIColor
cpan -i Time::HiRes

Next, install mytop, enter:
tar -zxvf mytop-1.6.tar.gz
cd mytop-1.6
perl Makefile.PL
make test
make install

To view information about database called foo, enter:
$ mytop -u dba -p 'password' -h -d foo

  • -u : Database username.
  • -p : Database password.
  • -h : Database server IP address.
  • -d : Database name.

Read mytop man page for further information:
perldoc mytop

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

How to Make Website WCAG Compliant?

Next Post

Link download Kali Linux 2020.1 (ISO + Torrent)

Related Posts