I inherited a mysql server, and so I've started with running the MySQLTuner.pl script. I am not a MySQL expert but I can see that there is definitely a mess here. I'm not looking to go after every single thing that needs fixing and tuning, but I do want to grab the major, low hanging fruit.

Total Memory on the system is: 512MB. Yes, I know it's low, but it's what we have for the time being.

2 Answers
2

"The two most important settings for InnoDB are the
buffer pool size and the log file size. Nearly every
other setting in the server can be left at its default
without causing much harm—or at least, the defaults are acceptable in many cases—but these two
settings cannot be left at their defaults, and are never
acceptable for production servers."

First, the way the my.cnf file works is that if a configuration directive is not in the file, it is assumed to be the default value. (That is, if the my.cnf file is completely empty, all configuration options would be set at defaults.) So if, for example, you wanted to act on this suggestion:

tmp_table_size (> 16M)

...you would just add this line to your my.cnf file:

tmp_table_size 32M

(I suggest checking the MySQL documentation before diverging too far from the script's suggestions, but you sound cautious enough that you were planning to do that already.)

It sounds like some of the things you need to implement will be in your application (e.g. ensuring that connections are properly closed, optimizing queries, etc.). How you do that is going to depend on how that application is built and which language bindings you're using.