How to Install/Uninstall WatchMySQL Mysql Database Monitoring Plugin

WatchMySQL

 

On Linux servers persistent mySQL connections will consume high server resources and it will lead to slow website and high server load. WatchMySQL is a free plugin used to monitor mysql queries on a cPanel server. This plugin is developed by the web hosting company Ndchost (check ndchost.com website for more details). You can send an email/ticket to Ndchost if you are facing any issues after installing this plugin.

Features :

1. WatchMySQL is used to monitor concurrent user connections in mySQL server

2. This plugin will send an email alert to administrator or cPanel user when the user exceeds the concurrent MySQL connection limit

3. You can set mySQL connection limit for specific cPanel users or globally.

4. There is an option to kill mySQL connections if it exceeds the limit
 


 

How to Install watchmysql mySQL monitoring plugin on cPanel/WHM Server

 
You must have server root access to install this monitoring tool.

1. Log into linux server via SSH as ‘root’

2. Go to /usr/local/src directory

cd /usr/src

3. Download WatchMySQL using wget command

wget http://download.ndchost.com/watchmysql/latest-watchmysql

4. Run WatchMysql Installation script

sh latest-watchmysql
 


 

How to Remove/Uninstall WatchMySQL mysql Database Monitoring

 
You must have server root access to remove WatchMySQL monitoring plugin.

1. Log into your linux server as ‘root’ user

2. Run the command ‘/var/cpanel/addons/watchmysql/bin/uninstall’ to uninstall WatchMySQL plugin
 

[root@server2 ~]# /var/cpanel/addons/watchmysql/bin/uninstall
watchmysql unregistered
[root@server2 ~]#

 
uninstall script will remove watchmysql service and directories. Remove the below directories from the server (if it exists)

rm -f /usr/local/cpanel/whostmgr/docroot/cgi/addon_watchmysql.php
rm -rf /usr/local/cpanel/whostmgr/docroot/watchmysql
rm -f /usr/sbin/watchmysql
rm -f /etc/watchmysql.config
rm -f /etc/watchmysql.userlimits
rm -f /etc/watchmysql.packagelimits
rm -f /etc/chkserv.d/watchmysql
rm -f /etc/init.d/watchmysql
 

Uninstall Watchmysql

Uninstall Watchmysql