Support MySQL 8.0 now that it is GA
Overview
MySQL 8.0 went General Availability on April 19, 2018. CiviCRM's aim is to support the latest GA for required infrastructure (MySQL, PHP) as soon as feasible.
In reviewing removed features that cause incompatibilities (https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html) I noticed a couple of issues that definitely require changes, one that might cause syntax errors that are easily fixed when found, and a fourth that we may want to change to improve our functionality and get current.
This is a meta issue for tracking what's needed for MySQL8. I have added a MySQL8 flag to lab for the moment to help in tracking. We can delete that flag after this issue is deemed complete.
#1142 (closed)
Related issue: Upgrade test infrastructure to enable testing against a version on the edge of being officially supported:#1143 (closed)
Issue: Field Names now Reserved Words
#1144 (closed)
Testing issue: dependence on PHP version for MySQL authentication #1145 (closed)
Document dealing with changes to MySQL user password libraryPossible issue: Sort order on GROUP BY clauses
I don't think we have any code that tries to specify sort order on GROUP BY fields, but if so we will need to change to add an ORDER BY clause with the sort order. I think we should just try running tests on MySQL 8.0 and using it manually to determine locations in code with this issue, and play whack-a-mole on anything missed.