In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "Mtop, a tool for real-time monitoring of MySQL under Linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Required modules:
Curses
DBI Distributed as Bundle::DBI:
DBD::mysql
Getopt::Long (Distributed with Perl 5)
Net::Domain Part of libnet:
# perl-e use Curses
# perl-e use DBI
# perl-e use DBD::mysql
# perl-e use Getopt::Long
# perl-e use Net::Domain
No output means that the module has been installed, and there is an error that the corresponding module is not installed.
The latest version of the corresponding module can be given at the address given above.
Install the required Perl modules:
# tar zxvf Curses-x.xx.tar.gz
# cd Curses*
# perl Makefile.PL
# make
# make install
There is perl-DBI in yum warehouse, so install it directly with yum.
# yum-y install perl-DBI
Because the MySQL is compiled and installed, you need to add the path of lib to ld.so.conf
# vi / etc/ld.so.conf
/ usr/local/mysql/lib/mysql
# ldconfig
Although there is perl-DBD-MySQL in the yum repository, it depends on mysql, so it is still compiled and installed.
# tar zxvf DBD-mysql-x.xxxx.tar.gz
# cd DBD-mysql*
# perl Makefile.PL-mysql_config=/usr/local/mysql/bin/mysql_config
# make
# make install
Install mtop:
# tar zxvf mtop-0.6.6.tar.gz
# cd mtop-0.6.6
# perl Makefile.PL
# make
# make install
Add the appropriate MySQL user:
#-uroot-pPASSWORD
Mysql > GRANT RELOAD,PROCESS,SUPER ON *. * TO IDENTIFIED BY mtop
Mysql > FLUSH PRIVILEGES
Mysql > exit
Run:
Because the location of the mysql.sock is customized, you need to make a link mtop to run it.
# ln-s / var/run/mysqld/mysql.sock / tmp/mysql.sock
# mtop-dbuser=mtop-password=mtop
This is the end of the introduction of "Mtop, a tool for real-time monitoring MySQL under Linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.