When you initially install MySQL on a cloud server (Ubuntu 14.04) the
/etc/mysql/my.cnf file is configured to work with only 32M RAM. This is pretty crazy when you consider that most cloud servers have at least 1GB of RAM, it could be holding your website up so it is something you should consider changing.
If you want a quick way of boosting the MySQL performance without having to tune the configuration, then a number of pre-built configurations are stored in:
my-huge.cnf is for a system with memory of 1G-2G.
It would be nice if you could just copy this over
my.cnf and restart MySQL but that doesn’t work. You’ll get the message start:
Job failed to start
What needs changing to make this work on a recently installed system?
[mysqld] section, add
user = mysql and that’s all you need to do if you are using MyISAM.
If you want to use InnoDB then remove the commented out section on Replication Slave (it’s unnecessary and just complicates understanding the file)
Uncomment the InnoDB section but leave the following line commented out:
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
because by default it uses:
innodb_data_file_path = ibdata1:10M:autoextend which is auto-extending.
Finally before starting MySQL you need to delete the log files with
rm /var/lib/mysql/ib_logfile* because these details have changed.
That’s all you need to do. You’ll now be able to enjoy the extra performance of having a MyISAM key buffer of 384MB and an InnoDB buffer pool of 384MB.