mytop
is a real-time MySQL monitoring tool similar to top
, designed for administrators.
π Step 1: Install Dependencies
dnf install -y epel-release
dnf install -y perl perl-DBI perl-TermReadKey perl-App-cpanminus mysql
π Step 2: Install MyTop Using CPAN Minus (cpanm)
cpanm Mytop
This will pull and install the latest compatible version of mytop
and any required modules.
β Step 3: Run MyTop
You can now launch mytop
with:
mytop -u root -p
If your MySQL is on a different socket or host, specify it like so:
mytop -u root -p -h localhost -P 3306
π Optional: Alias it System-Wide
If mytop
isnβt directly available in your shell after install, you can find and symlink it:
ln -s $(find / -name mytop 2>/dev/null | grep bin/mytop$ | head -n1) /usr/local/bin/mytop
π‘ Troubleshooting
If Perl modules are missing or outdated, run:
cpanm Term::ReadKey
cpanm DBI
If needed, install cpanm
manually:
dnf install -y perl-App-cpanminus