MySQL Tuning Tools

mysqltuner, to quickly get this working just run the following:
wget mysqltuner.pl
chmod 0700 mysqltuner.pl
./mysqltuner.pl

To run again, just use this line:
./mysqltuner.pl

MySQLReport
wget hackmysql.com/scripts/mysqlreport
chmod +x ./mysqlreport
./mysqlreport --user USER --password PASSWORD

To run again, just use this line:
./mysqlreport --user USER --password PASSWORD

Guide for MySQL report: http://hackmysql.com/mysqlreportguide#questions_report:total

and the obligatory diagnostic syntax to restart your mysql server:
/etc/init.d/mysqld restart

Also a nice summary of all your MySQL variables:
mysqladmin -u USER --password=PASSWORD variables | more

We had a query go out of control here and take over all cpu on our server recently so we initiated a cpu load control system with respect to mysql queries. However, do implement this we had to bring apache down too. Here is the appropriate command:
/etc/init.d/httpd restart

Leave a Reply

Your email address will not be published. Required fields are marked *