MySQL Server can be optimized at a basic level, using the MySQL tuner script.
Download the script using the command:
wget https://github.com/major/MySQLTuner-perl/zipball/master
Now, run the commands:
unzip master cd major-MySQLTuner* chmod +x mysqltuner.pl perl mysqltuner.pl
The script will check the status of MySQL and update you with the variables that you need to tweak to optimize MySQL.
Variables to adjust: query_cache_size (> 64M) join_buffer_size (> 2.0M, or always use indexes with joins) tmp_table_size (> 16M) max_heap_table_size (> 16M) table_open_cache (> 8192) innodb_buffer_pool_size (>= 520M)
These you can change by editing /etc/my.cnf file, that make mysql perform better.