Everyone who ever used MySQL under heavy load faced the performance problem. There numerous manuals and advises, tricks and “how to ?” examples. But you will definitely not find the solution which suits 100% for your project and will fix all your issues. You have to learn it. You have to spend your time.
The answer looks to be very simple. It depends on the Linux distribution you are using. The best is to use built-in version into your distribution.
I do not recommend to build own version especially for production server, leave it to who got time for this.
What to do if your distribution got old version of MySQL like it usually happens with CentOS ? Use another good known repositories repositories. It is more safe than to build your own MySQL.
Another thing you have pay attention is that version from version new features might be not functional with you previous configurations.
Usually MySQL config file store in /etc/my.cnf; This file could contain your own config settings, but after update they could be not functional with new version, so it’s better to backup this file and to remove it form /etc location and use generic file, by adding one by one parameters from your previously saved my.cnf file.
As for me I use Les RPM de Remi as repository for CentOS to install MySQL. It is always fresh and tuned there and I never had any problem with update or remove of MySQL with this repository.