One of the big areas with MySQL that people struggle with is setting up its config correctly.
The main thing that can help is to ensure that your buffer pool is large enough to hold all of your data in memory.
MySQLTuner is a great tool to help with setting up MySQL - or to check settings/performance later on.
wget http://mysqltuner.pl/ -O mysqltuner.pl chmod +x mysqltuner.pl ./mysqltuner.pl
It gives you a detailed output showing all the areas you need to look at, eg: