Everyone knows the importance of having an optimal database as these are the cornerstone of any application including PHP websites.
Tuning your MySQL or MariaDB Databases are not for the fainthearted however with this simple script anyone can tune their databases with minimal effort and risk. Please note however that before changing any database settings we encourage you to take a backup via a snapshot or some other backup mechanism before making any database changes. Please also make sure that you fully understand what each function does and the consequences for each change you are making as doing something wrong here could be disastrous for your application or website.
What MySQLTuner is checking exactly ?
All checks done by MySQLTuner are documented in MySQLTuner Internals documentation.
You can download the entire repository by using ‘git clone’ followed by the cloning URL above. The simplest and shortest method is:
wget http://mysqltuner.pl/ -O mysqltuner.pl
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv
Running the above script against your MySQL database will check your existing installation against common performance benchmarks and scans your current setup and provides you with recommendations and changes that you can make to further optimize your database installation.