For tuning MySQL, normally it will check index scan, cache and any hardware allocation align with database or not. To measure it, there are several tools to support your judgement.
phpMyAdmin
It is the web based MySQL management console, also it embed performance advisor. For quick start in local computer, you can run phpMyAdmin in docker with command as below.
docker run -d -e PMA_HOST=<<External host name>> -p 8080:80 phpmyadmin
To get performance advisor, go to Status > Advisor, it will generate report and recommendation.
MySQLTunner
To overall scan MySQL and check any area to optimize and vulnerables found, MySQLTunner is a great tools to do so. To do so, run command in Linux as below:
# Install Perl to execute perl script. sudo yum install perl -y # Create folder and store MySQL Tuner files. mkdir mySqlTunner cd mySqlTunner/ 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 # Execute script and store report in text file. perl mysqltuner.pl --host <<Database host name>> --user <<User name>> --pass <<Password>> --forcemem 1024 > result.txt
Leave a Reply