MySqlTuner MySql tuning script
Posted on 03-08-2013 19:05
When you run the MySqlTuner MySql tuning script you get advice what variables to adjust in my.cnf.
My.cnf holds the settings for the MySql server.
Adjusting these settings can increase your website performance dramatically.
Wrong settings can be disastrous!
Download the script to your server. (remember de directory your in!)
alternatively you can download it as an attached file here at the bottom of the post or try the line below.
wget -O mysqltuner.pl http://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl
You must make it executable otherwise it won't run.
chmod +x mysqltuner.pl
Now we can run/execute it from the directory where you saved it in an SSH terminal as root with
Please enter your MySQL administrative password:
You can either use root as login name or your MySql login name. So login can be for example root or da_admin.
Then enter the corresponding password.
The output of the MySqlTuner tuning script looks something like this:
-------- General Statistics --------------------------------------------------
In my case no variables to adjust where suggested, but in your case you could get something like this:
Variables to adjust:
Just add or alter them in my.cnf:
query_cache_size = 32M
In my opinion this is the most important line!!
Highest usage of available connections: 16% (4/25)
Standard MySQL installations have a max_connections = 250 setting as default.
This means when you start tuning with this setting you will ran out of memory very quickly.
So make sure this is the first to adjust.
I all ready reduced max_connections to 25 ten times less as default. My next step would be to reduce max_connections to 10. Don't go below the Highest usage of available connections but keep a safe margin, otherwise your users will see a mysql warning.
To be continued.
webmastertrouble attached the following file:
|Jump to Forum
Use BBcode or HTML to refer to; 'MySqlTuner MySql tuning script'
|Subject||Discussion Forum||Last Post|
|Getting started with MySQL over SSL||Linux tutorials, Tips & Tricks||: 1||22-06-2014|
|Getting started with MySQL Master-Slave replication||Linux tutorials, Tips & Tricks||: 1||04-05-2014|