Suscpicious Database Errors
This issue was fixed in CiviCRM 4.7.10.

If you are using an earlier version of CiviCRM (e.g. 4.6), one option is to stick to an earlier version of MySQL (e.g. 5.6).

Alternatively, as stated in the question, you can fix this problem by adding a custom config file for MySQL.  I used the following file:

[mysqld]
# Turn off 'ONLY_FULL_GROUP_BY' option as this breaks CiviCRM &lt; 4.7.10
sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"


Rather than using my settings, I suggest that you check your current SQL mode with the following query:

SELECT @@SQL_MODE; 


Copy the results of this query into the file above without ONLY_FULL_GROUP_BY.