MySQL best performance settings
The answer to this question varies depending on what database engine backend you're using.

If you're wildly unfamiliar with all of them, I really recommend that you use TokuDB, because it's entirely self-configuring with no modifications necessary out of the box.

I use MariaDB (MySQL clone) with Aria tables. My configuration would be totally, and completely different from yours.

If you use InnoDB, set innodb_buffer_pool_size to 80% of what you find appropriate for a database to be using, up to a maximum of 10% larger than your data size. 

If you use TokuDB, use stock config.

If you use MyISAM, may Loki have mercy on your soul.