• Welcome to XF2 Addons. You can buy my Premium membership for $35 per year, and this gives you access to download any or ALL of the 300 add-ons that I have developed for Xenforo 2.x. In addition, Premium members will get technical support. Once the Premium membership has expired you can continue to use the installed addons on your forum as long as you like.

MySQL tuner


Andy

Administrator
Staff member
Copy the contents of this script:

https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl

Create a file called mysqltuner.pl and upload to your server.

Log into your server SSH and navigate to the directory where you have uploaded mysqltuner.pl file.

Execute the following command:

perl mysqltuner.pl
 

Andy

Administrator
Staff member
Based on recommendations update the /etc/my.cnf file.

sudo nano /etc/my.cnf

Code:
[mysqld]
innodb_file_per_table=1
default-storage-engine=MyISAM
performance-schema=0

# code added by me
innodb_buffer_pool_size=4G
innodb_log_file_size=1G
innodb_buffer_pool_instances=4
max_allowed_packet=268435456
A link which explains innodb_buffer_pool_size settings:

https://www.percona.com/blog/2007/11/03/choosing-innodb_buffer_pool_size/

After making changes be sure to restart MySQL:

WHM -> Restart Services -> SQL Server (MySQL)
 

Andy

Administrator
Staff member
How to show MySQL Variables

SSH into terminal as "root"

ssh 123.123.123.123 -l root
type: mysql
type: show variables;
 
Similar threads
Thread starter Title Forum Replies Date
Andy MySQL - max_connections Server Information 2
Andy Show MySQL variables Server Information 2
Andy MySQL queries General 1

Similar threads

Top