MySQLTuner is great script to optimize mysql database of a server. It reports a large number of statistics and settings from your MySQL database engine, and then offers general recommendations to improve performance.
To run MySQLTuner on a serve / VPS with cPanel, run following command in SSH
/usr/local/cpanel/bin/mysqltuner.pl