βœ… Install MyTop on AlmaLinux 8/9

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
Scroll to Top